Re: Handling Blobs with libpq

Поиск
Список
Период
Сортировка
От Daniel Bruce Lynes
Тема Re: Handling Blobs with libpq
Дата
Msg-id 200303211442.07705.dlynes@shaw.ca
обсуждение исходный текст
Ответ на Handling Blobs with libpq  (Stéphane Pinel <spinel@noos.fr>)
Список pgsql-interfaces
On Thursday 20 March 2003 01:56, Stéphane Pinel wrote:

> My main need is storing pictures (like Jpegs etc) or small blobs. Doc
> says that (2) is more
> appropriate but I need to work with blobs in memory, not from files.

If you need to work with it in memory, you're better off using the bytea (same
thing as a varbinary).  LOBs are generally for when the data is so large that
the performance of your application would be comprimised if you allocated
memory for the contents.  LOBs allow you to do streaming so that you don't
need to allocate memory.  Only the lo_export/lo_import functions require a
file.  All of the other LOB functions only require a stream that's chunked
into byte arrays.



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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: I want to send comments to the backend!
Следующее
От: Gerhard Häring
Дата:
Сообщение: Re: I want to send comments to the backend!