Re: Will Connection.createBlob be implemented any time soon?

Поиск
Список
Период
Сортировка
Искать
От
Andreas Joseph Krogh
Тема
Re: Will Connection.createBlob be implemented any time soon?
Дата
Msg-id
OfficeNetEmail.46.d375005b1e5e082d.143aacfb5b4@prod2
Ответ на
Список
Дерево обсуждения
Will Connection.createBlob be implemented any time soon? Andreas Joseph Krogh <andreak@officenet.no>
Re: Will Connection.createBlob be implemented any time soon? Craig Ringer <craig@2ndquadrant.com>
Re: Will Connection.createBlob be implemented any time soon? Andreas Joseph Krogh <andreak@officenet.no>
Re: Will Connection.createBlob be implemented any time soon? Dave Cramer <pg@fastcrypt.com>
Re: Will Connection.createBlob be implemented any time soon? Andreas Joseph Krogh <andreak@officenet.no>
Re: Will Connection.createBlob be implemented any time soon? Thomas Kellerer <spam_eater@gmx.net>
Re: Will Connection.createBlob be implemented any time soon? Andreas Joseph Krogh <andreak@officenet.no>
Re: Will Connection.createBlob be implemented any time soon? Tom Dunstan <pgsql@tomd.cc>
Re: Will Connection.createBlob be implemented any time soon? Florian Weimer <fweimer@redhat.com>
Re: Will Connection.createBlob be implemented any time soon? Andreas Joseph Krogh <andreak@officenet.no>
Re: Will Connection.createBlob be implemented any time soon? Florian Weimer <fweimer@redhat.com>
Re: Will Connection.createBlob be implemented any time soon? Andreas Joseph Krogh <andreak@officenet.no>
Re: Will Connection.createBlob be implemented any time soon? Craig Ringer <craig@2ndquadrant.com>
Re: Will Connection.createBlob be implemented any time soon? Andreas Joseph Krogh <andreak@officenet.no>
Re: Will Connection.createBlob be implemented any time soon? Dave Cramer <pg@fastcrypt.com>
Re: Will Connection.createBlob be implemented any time soon? Andreas Joseph Krogh <andreak@officenet.no>
Re: Will Connection.createBlob be implemented any time soon? Thomas Kellerer <spam_eater@gmx.net>
Re: Will Connection.createBlob be implemented any time soon? Andreas Joseph Krogh <andreak@officenet.no>
På søndag 19. januar 2014 kl. 14:58:00, skrev Thomas Kellerer <spam_eater@gmx.net>:
Andreas Joseph Krogh wrote on 19.01.2014 14:41:
>     Using PreparedStatement.setBinaryStream() works without problems.
>     You don't even need the intermediate Blob instance:
>
>     PreparedStatement pstmt = con.createStatement("....");
>
>     pstmt.setBinaryStream(1, is);
>         or
>     pstmt.setBinaryStream(1, is, length);  // if the length is known
>
> I'm using JPA and need to be able to set a (new) Blob as a field, like this:

Ah! The joys of database obfuscation layers.
Sorry, I can't help you with that.

> val b = con.createBlob()
> val os = b.setBinaryStream(1)
> IOUtils.copyLarge(is, os, new Array[Byte](1024 * 1024))
> myEntity.setData(b)

The above code (val b = ...) does not look like Java. What exactly is that?
 
Scala, but for this case it is irrelevant.
 
Is there any reason why Connection.createBlob isn't implemented in the official driver?
The NG-driver (https://github.com/impossibl/pgjdbc-ng) has it and it works quite well. I am, however, experiencing some issues in my app and want to test it with the official driver, but am unable to because it doesn't support createBlob, which my app needs.
 
Is it possible to fund development of it and have it merged into the official driver?
 
--
Andreas Joseph Krogh <andreak@officenet.no>      mob: +47 909 56 963
Senior Software Developer / CTO - OfficeNet AS - http://www.officenet.no
Public key: http://home.officenet.no/~andreak/public_key.asc
 
В списке pgsql-jdbc по дате отправления
От: Thomas Kellerer
Дата:
От: Frederik Wiers
Дата:
Сообщение: StringBuffer vs. StringBuilder
FAQ