Обсуждение: Any chance to get support for createBlob?

Поиск
Список
Период
Сортировка

Any chance to get support for createBlob?

От
Christian Schmitt
Дата:
Hello, currently we are relying on the LargeObject API of PostgreSQL. Currently we access the Large Object API directly
viaunwrap 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?

Вложения

Re: Any chance to get support for createBlob?

От
Lachezar Dobrev
Дата:
  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.schmitt@envisia.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?