On Wed, 20 Sep 2006, Tom Lane wrote: > Tomasz Ostrowski <tometzky@xxxxxxxxxxxxx> 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