Re: Correctly producing array literals for prepared statements

From: Peter Geoghegan <peter(dot)geoghegan86(at)gmail(dot)com>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Correctly producing array literals for prepared statements
Date: 2011-02-23 15:09:14
Message-ID: AANLkTi=tAC9B=MR3rqb3Y9xrswUT6s5zuZ4mBN93aeL1@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 23 February 2011 04:36, Greg Stark <gsstark(at)mit(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-02-23 15:10:07 Re: WIP: cross column correlation ...
Previous Message Alexander Korotkov 2011-02-23 15:00:09 WIP: collect frequency statistics for arrays