Re: Memory efficient insertion/retrieval of bytea

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tomasz Ostrowski <tometzky(at)batory(dot)org(dot)pl>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Memory efficient insertion/retrieval of bytea
Date: 2006-09-20 14:38:19
Message-ID: 2870.1158763099@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tomasz Ostrowski <tometzky(at)batory(dot)org(dot)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.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Matthias.Pitzl 2006-09-20 14:40:35 Re: Strange database corruption with PostgreSQL 7.4.x o
Previous Message Tom Lane 2006-09-20 14:31:35 Re: Strange database corruption with PostgreSQL 7.4.x on Debian Sarge