Re: Any chance to get support for createBlob?

From: Lachezar Dobrev <l(dot)dobrev(at)gmail(dot)com>
To: Christian Schmitt <c(dot)schmitt(at)envisia(dot)de>
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Any chance to get support for createBlob?
Date: 2015-08-04 12:26:27
Message-ID: CA+xsaB0yd0O7FAWQQxEFQ_yYopxo__+oVDK6s0YzMZ9iW9ECVg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

A temporary (until fixed) work-around is to execute:
SELECT lo_create(0)
And do a
ResultSet.getBlob(1)

I have not tried it, but this may also work with EntityManager:
.createNativeQuery("SELECT lo_create(0)", Blob.class).getSingleResult();

In PostgreSQL Blobs are not exactly the same thing as the JDBC Blobs, in
JDBC it seems Blobs are functional values, while in PostgreSQL they're more
like stand-alone objects that can and must be managed on their own.

2015-08-04 12:16 GMT+03:00 Christian Schmitt <c(dot)schmitt(at)envisia(dot)de>:

> Hello, currently we are relying on the LargeObject API of PostgreSQL.
> Currently we access the Large Object API directly via unwrap of the
> Connection that comes from the Connection Pool, however there is also a
> createBLOB method of the Driver, but that doesn’t work as of JDBC 4.x - 9.4
> Is there any chance that createBLOB will also be supported, like getBLOB?
>

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Vladimir Sitnikov 2015-08-04 17:51:44 Re: Release schedule
Previous Message Christian Schmitt 2015-08-04 09:16:44 Any chance to get support for createBlob?