Re: Streaming blob to db

Поиск
Список
Период
Сортировка
Искать
От
Jesper Thorhauge
Тема
Re: Streaming blob to db
Дата
Msg-id
42C649AC.60403@conzentrate.com
Ответ на
Streaming blob to db (時期 精霊)
Список
Дерево обсуждения
Streaming blob to db 時期 精霊 <kuon@goyman.com>
Re: Streaming blob to db Jesper Thorhauge <jth@conzentrate.com>
Re: Streaming blob to db Kris Jurka <books@ejurka.com>
Re: Streaming blob to db 時期 精霊 <kuon@goyman.com>
Re: Streaming blob to db Roland Walter <rwa@mosaic-ag.com>
Re: Streaming blob to db Tom Lane <tgl@sss.pgh.pa.us>
Hi Kuon

Use the standard jdbc method on a PreparedStatement, called 
setBinaryStream(..) (using version 8.0.x of the driver). The bad thing 
is that getting the data out from database using getBinaryStream(..) 
will use a lot of memory relative to the filesize - there seems to be no 
way to avoid this. Look elsewhere in the archives for an explanation by 
Oliver on this issue...

Regards
Jesper

時期 精霊 wrote:

> Hello,
>
> I got a web application that use jdbc and that will need to stream  
> binary data to the database.
>
> My application need an outputstream to send the data to the db, and  
> an inputstream to read the data from the db.
>
> I seeked the web but I did not found any working example.
>
> I use postgresql 8.0.1 with bytea field.
>
> The data size will be around:
>
> <1mb 50%
> 1 - 100mb 30%
> >100mb 20%
>
> Any idea of the best approach?
>
> Regards
>
> Kuon



-- 


В списке pgsql-jdbc по дате отправления
От: Scott Marlowe
Дата:
Сообщение: Re: XA support
От: Jonas Partner
Дата:
FAQ