You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Bill Schneider <bs...@vecna.com> on 2003/01/28 21:30:42 UTC

Torque and LOBs

I'm testing to see if I can get Torque to support large objects across
different databases focusing on PostgreSQL and Oracle right now.  I've
noticed two things:

In Oracle (9.2): inserts into CLOBs and BLOBs in work right out of the box,
but for some reason, CLOB columns are "null" after a select.

In PostgreSQL (7.3): major problems trying to get LOB insertion to work.
First ran into trouble because JDBC driver metadata returns "Types.INTEGER"
for columns of type "oid" rather than VARBINARY.  Patched the JDBC driver to
return VARBINARY, but now have another problem: PostgreSQL is returning

"ERROR: oidin: error in "string": can't parse "string""

on closer inspection inside the JDBC driver somehow the byte[] got turned
into a String.  Any ideas how that could have happned?

Anyone successful using PG + Torque + large objects?

-- Bill


Re: Torque and LOBs

Posted by "Peter S. Hamlen" <ph...@mail.com>.
Bill,

I had the same problem (and eventually gave up trying to make it work). 
I don't remember exactly why it  was happening, but I do remember how I
tracked it down.

I basically recompiled the Postgres JDBC driver with the debug flag on
(you have to change the Configuration settings and recompile).  I then
put a breakpoint on execute function in Statement.java (line 116 on my
version).

I then stepped through each sql statement that was executed.  (If I
recall correctly, it was that Torque was somehow sending a "string" into
the large object or something.)  If you still have problems tracking it
down, I could spend some time on my end reproducing the problem.

Hope this helps!
-Peter

On Tue, 2003-01-28 at 15:30, Bill Schneider wrote:
> I'm testing to see if I can get Torque to support large objects across
> different databases focusing on PostgreSQL and Oracle right now.  I've
> noticed two things:
> 
> In Oracle (9.2): inserts into CLOBs and BLOBs in work right out of the box,
> but for some reason, CLOB columns are "null" after a select.
> 
> In PostgreSQL (7.3): major problems trying to get LOB insertion to work.
> First ran into trouble because JDBC driver metadata returns "Types.INTEGER"
> for columns of type "oid" rather than VARBINARY.  Patched the JDBC driver to
> return VARBINARY, but now have another problem: PostgreSQL is returning
> 
> "ERROR: oidin: error in "string": can't parse "string""
> 
> on closer inspection inside the JDBC driver somehow the byte[] got turned
> into a String.  Any ideas how that could have happned?
> 
> Anyone successful using PG + Torque + large objects?
> 
> -- Bill
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>