Re: Streaming binary data into db, difference between Blob - Mailing list pgsql-jdbc

From Andreas Prohaska
Subject Re: Streaming binary data into db, difference between Blob
Date
Msg-id A11D9B8C48C1D411AE0C000062A129947B1C63@ganymed.allocation.net
Whole thread Raw
Responses Re: Streaming binary data into db, difference between Blob  (Nicolas Modrzyk <nicolas.modrzyk@inrialpes.fr>)
List pgsql-jdbc
> > Looking at the AbstractJdbc2Blob class I think that JDBC Blobs
internally
> > use LargeObjects. As I know, this was not the case in earlier versions
> > of the driver. Am I right?
> >
>
> This is for the PostgreSQL Large Objects, not the standard JDBC and SQL
> BLOBs.
>

OK. If I got you right, the Postgres JDBC driver "simulates" the
java.sql.Blob
getBinaryStream() etc. methods by using LargeObject internally.

That seems to be a working solution for me. I just want to keep my
application's
database layer compatible using ordinary JDBC objects. I don't mind if
they are mapped to LargeObject internally. Actually that's even better
regarding
the streaming issues :-)

I assume that I can use this to read and write Blobs, not to delete them
since the LargeObject wouldn't be unlinked.

I'm not familiar with the JDBC driver source, and I would be glad if you
could
confirm this just one more time.

>
> > So far, I'm using LargeObjects and everything works fine,  but I intend
to
> > use c-jdbc for db replication and would have to use JDBC blobs then.
> >
>
> We don't have them yet because PostgreSQL does not have them.  But I
> believe c-jdbc works with PostgreSQL so there must be a way around it.

It certainly works with Postgres, the only question is if it works with
blobs?
I'll try it out.

Thanks for your help,

    Andreas

pgsql-jdbc by date:

Previous
From: Paul Thomas
Date:
Subject: Re: JBoss w/int8 primary keys in postgres ...
Next
From: Nicolas Modrzyk
Date:
Subject: Re: Streaming binary data into db, difference between Blob