Re: Streaming binary data into db, difference between Blob

From: Andreas Prohaska <ap(at)apeiron(dot)de>
To: 'Fernando Nasser' <fnasser(at)redhat(dot)com>
Cc: "'pgsql-jdbc(at)postgresql(dot)org'" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Streaming binary data into db, difference between Blob
Date: 2003-09-10 13:32:41
Message-ID: A11D9B8C48C1D411AE0C000062A129947B1C63@ganymed.allocation.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Nicolas Modrzyk 2003-09-10 13:48:52 Re: Streaming binary data into db, difference between Blob
Previous Message Paul Thomas 2003-09-10 13:31:53 Re: JBoss w/int8 primary keys in postgres ...