From: | Dennis Thrysøe <dth(at)conscius(dot)com> |
---|---|
To: | Kris Jurka <books(at)ejurka(dot)com> |
Cc: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: LargeObject API |
Date: | 2007-08-03 06:54:30 |
Message-ID: | 46B2D126.6070309@conscius.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
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.
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Cramer | 2007-08-03 11:02:48 | Re: statement caching patch from Laszlo Hornyak for review |
Previous Message | Kris Jurka | 2007-08-02 17:09:27 | Re: LargeObject API |