Re: BLOBs etc

From: Kris Jurka <books(at)ejurka(dot)com>
To: Sven Köhler <skoehler(at)upb(dot)de>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: BLOBs etc
Date: 2005-01-07 02:44:12
Message-ID: Pine.BSO.4.56.0501062135090.10098@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Fri, 7 Jan 2005, [ISO-8859-15] Sven Köhler wrote:

> on the jdbc-webpages it says, that the JDBC team may decide to change
> getBLOBG/setBLOB to support bytea only, and that one should use the
> PostGreSQL specific LargeObject extension to acces them.

I'm not sure where it says that, but it is either out of date or just
plain bad advice. If you could point out where it says that I'd
appreciate it. I would stick withe the standard Blob interface for now.
There are no plans to change this until better lob support is added to the
server and I don't know of anyone working on that. Even when
that happens backward compatibility will be provided by a URL parameter.

> Well, how should one be abled to use the LargeObjects extension, when
> ConnectionPools are used? The Connection object supplied by the
> ConnectionPool implementation is usually not the one supplied by the
> JDBC driver and therefor the object cannot be casted to PGConnection
> anymore. So the LargeObject extension cannot be used anymore like
> suggested on the page

That depends on your connection pool. For example jakarta's dbcp allows
access to the underlying connection like this:

PoolingDataSource dataSource = ...;
dataSource.setAccessToUnderlyingConnectionAllowed(true);

Connection conn = dataSource.getConnection();
Connection realConn = ((DelegatingConnection)conn).getInnermostDelegate();
PGConnection pgConn = (PGConnection)realConn;

Kris Jurka

In response to

  • BLOBs etc at 2005-01-07 02:17:06 from Sven Köhler

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Sven Köhler 2005-01-07 03:04:38 Re: BLOBs etc
Previous Message Oliver Jowett 2005-01-07 02:40:25 Re: BLOBs etc