Re: Handling Blobs with libpq - Mailing list pgsql-interfaces

From Daniel Bruce Lynes
Subject Re: Handling Blobs with libpq
Date
Msg-id 200303211442.07705.dlynes@shaw.ca
Whole thread Raw
In response to Handling Blobs with libpq  (Stéphane Pinel <spinel@noos.fr>)
List 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 by date:

Previous
From: Greg Stark
Date:
Subject: Re: I want to send comments to the backend!
Next
From: Gerhard Häring
Date:
Subject: Re: I want to send comments to the backend!