pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kris Jurka <books@ejurka.com>
To: Sven Köhler <skoehler@upb.de>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: BLOBs etc
Date: Thu, 6 Jan 2005 21:44:12 -0500 (EST)
Message-ID: <Pine.BSO.4.56.0501062135090.10098@leary.csoft.net> (raw)
In-Reply-To: <crkrbc$t8c$1@sea.gmane.org>
References: <crkrbc$t8c$1@sea.gmane.org>



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



view thread (23+ messages)  latest in thread

Message-ID: <Pine.BSO.4.56.0501062135090.10098@leary.csoft.net>
Permalink:  ../Pine.BSO.4.56.0501062135090.10098@leary.csoft.net/
Also on:    postgresql.org/message-id/Pine.BSO.4.56.0501062135090.10098@leary.csoft.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: books@ejurka.com, skoehler@upb.de
  Subject: Re: BLOBs etc
  In-Reply-To: <Pine.BSO.4.56.0501062135090.10098@leary.csoft.net>
  References: <crkrbc$t8c$1@sea.gmane.org> <Pine.BSO.4.56.0501062135090.10098@leary.csoft.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox