Binaries with Torque and Postgres isn't pretty, especially because there are
two layers--a JDBC driver and Village--between Torque and pg.
The best luck I've had is using the "bytea" type in postgresql, which I
believe is the SQL "LONGVARBINARY" type. (In Oracle, it's LONG RAW.) This
accepts and returns byte[] from a column nicely and even ported to Oracle.
BLOBs didn't work for me at last check, because the JDBC driver I was using
returned the integer OID (the pointer to the object) instead of the object
contents on a call to resultSet.getObject("blob_column"). That may have
changed since.
If you use bytea/LONG RAW, keep this stuff in a separate table because bytea
is stored in-row. OID/BLOB/etc are generally stored out-of-row.
- Bill
----- Original Message -----
From: "Peter S. Hamlen" <[EMAIL PROTECTED]>
To: "Turbine Torque Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, September 10, 2002 4:37 PM
Subject: Has anyone used Torque to store images in a database?
>
> We're at a point where we need to save images (sigh!) and we're thinking
> about saving them in our Postgres database.
>
> Has anyone on the list used Torque to save images?
>
> -Peter
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>