Streaming Blobs in PG 8.3

Поиск
Список
Период
Сортировка
От David Wall
Тема Streaming Blobs in PG 8.3
Дата
Msg-id 49220C79.9010909@computer.org
обсуждение исходный текст
Список pgsql-jdbc
I've been using the JDBC setBlob/getBlob routines, that wrap the PG's LO
routines I believe, for some time and they've worked great.  But we've
always done it with all of the data in a byte array for storing and
retrieving.

We are looking to add a streaming capability and wanted to know what the
"best approach" would be in JDBC?

Read streaming with a Blob seems pretty straightforward since even our
byte array version calls getBinaryStream() and then reads it into the
array.  But writing seems a bit less clear since I'm not sure how I get
the data into the Blob in a stream so that PG can suck it out of the
stream and write it to the database, and then how to tell my Blob that
I'm at "EOF" so that PG can also stop streaming it to the backend and
complete the LO.

I'd prefer to use pure JDBC, but is this easily accomplished (examples?)
or should I look to use the PG-specific LO routines directly in the JDBC
library?

Thanks,
David


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: "Don Pannese"
Дата:
Сообщение: Re: Java 6 support for org.postgresql.ds.PGPoolingDataSource
Следующее
От: "Reuben Cummings"
Дата:
Сообщение: neooffice form problem with numerics