Re: Correctly producing array literals for prepared statements - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: Correctly producing array literals for prepared statements
Date
Msg-id AANLkTi=tAC9B=MR3rqb3Y9xrswUT6s5zuZ4mBN93aeL1@mail.gmail.com
Whole thread Raw
In response to Re: Correctly producing array literals for prepared statements  (Greg Stark <gsstark@mit.edu>)
Responses Re: Correctly producing array literals for prepared statements  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
On 23 February 2011 04:36, Greg Stark <gsstark@mit.edu> wrote:
> This is only true for server encodings. In a client library I think
> you lose on this and do have to deal with it. I'm not sure what client
> encodings we do support that aren't ascii-supersets though, it's
> possible none of them generate quote characters this way.

I'm pretty sure all of the client encodings Tatsuo mentions are ASCII
supersets. The absence of by far the most popular non-ASCII superset
encoding, UTF-16, as a client encoding indicated that to me. It isn't
byte oriented, and Postgres is.

> I'm a bit surprised libpqxx isn't using binary mode internally though.
> This would at least avoid the problems with encoding. However I'm not
> sure things like the array binary format are really stable and
> portable enough to really use from a client library. Some datatypes
> might be dependent on the server ABI (floats -- I'm looking at you) so
> that might make it difficult or impossible.

Yes, that question is addressed here:
http://pqxx.org/development/libpqxx/wiki/BinaryTransfers .

-- 
Regards,
Peter Geoghegan


pgsql-hackers by date:

Previous
From: Alexander Korotkov
Date:
Subject: WIP: collect frequency statistics for arrays
Next
From: Robert Haas
Date:
Subject: Re: WIP: cross column correlation ...