pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Daniel Bruce Lynes <dlynes@shaw.ca>
To: pgsql-interfaces@postgresql.org
Subject: Re: Handling Blobs with libpq
Date: Fri, 21 Mar 2003 14:42:07 -0800
Message-ID: <200303211442.07705.dlynes@shaw.ca> (raw)
In-Reply-To: <41AAAA03-5ABA-11D7-8432-000A27AFF5D2@noos.fr>
References: <41AAAA03-5ABA-11D7-8432-000A27AFF5D2@noos.fr>

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.




view thread (6+ messages)

Message-ID: <200303211442.07705.dlynes@shaw.ca>
Permalink:  ../200303211442.07705.dlynes@shaw.ca/
Also on:    postgresql.org/message-id/200303211442.07705.dlynes@shaw.ca

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: dlynes@shaw.ca
  Subject: Re: Handling Blobs with libpq
  In-Reply-To: <200303211442.07705.dlynes@shaw.ca>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox