pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dennis Thrysøe <dth@conscius.com>
To: Kris Jurka <books@ejurka.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: LargeObject API
Date: Fri, 03 Aug 2007 08:54:30 +0200
Message-ID: <46B2D126.6070309@conscius.com> (raw)
In-Reply-To: <Pine.BSO.4.64.0708021304160.14791@leary.csoft.net>
References: <46B18B42.2020709@conscius.com>
	<Pine.BSO.4.64.0708021304160.14791@leary.csoft.net>

Kris Jurka wrote:
> On Thu, 2 Aug 2007, Dennis Thrysøe wrote:
> 
>> Is there any way to use the proprietary LargeObject API, without 
>> actually having a reference to the postgresql Drivers's Connection 
>> object?
> 
> Often connection wrappers provide a means to access the underlying 
> Connection.  You don't say what you're using so you'll have to consult 
> those docs yourself.

My goal is to support any j2ee server, so I cannot assume much about any 
proxy/pooling mechanism.

> stmt.execute("CREATE TABLE t (a int, b oid)");
> stmt.execute("INSERT INTO t VALUES (1, lo_creat(-1))");
> ResultSet rs = stmt.executeQuery("SELECT b FROM t WHERE a = 1");
> rs.next();
> Blob b = rs.getBlob(1);

Thanks. That looks like a good solution.

-dennis
---------------------------------------------------------------------------
The information in this email is confidential and may be legally protected.




view thread (4+ messages)

Message-ID: <46B2D126.6070309@conscius.com>
Permalink:  ../46B2D126.6070309@conscius.com/
Also on:    postgresql.org/message-id/46B2D126.6070309@conscius.com

 · 

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: dth@conscius.com, books@ejurka.com
  Subject: Re: LargeObject API
  In-Reply-To: <46B2D126.6070309@conscius.com>
  References: <46B18B42.2020709@conscius.com> <Pine.BSO.4.64.0708021304160.14791@leary.csoft.net> <46B2D126.6070309@conscius.com>

* 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