Re: Memory efficient insertion/retrieval of bytea - Mailing list pgsql-general

From Tomasz Ostrowski
Subject Re: Memory efficient insertion/retrieval of bytea
Date
Msg-id 20060920150731.GJ30944@batory.org.pl
Whole thread Raw
In response to Re: Memory efficient insertion/retrieval of bytea  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Wed, 20 Sep 2006, Tom Lane wrote:

> Tomasz Ostrowski <tometzky@batory.org.pl> writes:
> > Now for inserting data to a bytea we need 5*data_size in a buffer for
> > escaped data representation. 6*data_size if we do PQescapeByteaConn
> > in one chunk.
>
> If you send the value as an out-of-line binary parameter then you don't
> need any of that.  See PQexecParams.

Nice. I've overlooked this.

This still needs 1*data_size for a buffer though. Much better but
sometimes not enough.

Regards
Tometzky
--
...although Eating Honey was a very good thing to do, there was a
moment just before you began to eat it which was better than when you
were...
                                                      Winnie the Pooh

pgsql-general by date:

Previous
From: "Jack Orenstein"
Date:
Subject: Re: Initializing Datums for use with SPI_execute_plan
Next
From: Tony Caduto
Date:
Subject: Re: postgresql rising