Thread: blobs and small binary objects

blobs and small binary objects

From
"David Wall"
Date:
I'm new to Postgresql and am trying to figure out how I'd store Serializable
objects, byte arrays and potentially large binary objects.  JDBC has APIs
for getObject(), getBytes() and getBlob(), but how do I define those
attributes inside a table?  I don't see the typical BYTE or BINARY or BLOB
types.

I know that 7.0.3 still suffers from the 8K row limit, so I'd hope that the
JDBC library would automatically handle this for me, if I define some small
objects as byte arrays, and larger objects are blobs.  I saw somewhere a
type BYTEA (byte array?), but I can't find it in the documentation to know
if this is a real type, one of the user defined types that's a common
extension, etc.

Anybody handle these issues yet?

Thanks,
David





Re: blobs and small binary objects

From
"David Wall"
Date:
I discovered type OID in the JDBC sample database for BLOBs, but I don't see
it in the documentation.

From a quick test, it appears that the blob itself is not stored in the row
itself, but is instead an object pointer of some kind.  Is an OID actually a
fixed length field that points to my blob?  Or is it more like a VARCHAR, in
which case it would be better to store it at the end of the row for storage
performance reasons?

David