Skip site navigation (1) Skip section navigation (2)

Re: Correctly producing array literals for prepared statements

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Peter Geoghegan <peter(dot)geoghegan86(at)gmail(dot)com>
Cc: PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Correctly producing array literals for prepared statements
Date: 2011-02-23 04:36:38
Message-ID: AANLkTi=CyXRYC54mA-3atQ22UMc1_1e92A0tWVi1qTjy@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Wed, Feb 23, 2011 at 4:16 AM, Peter Geoghegan
<peter(dot)geoghegan86(at)gmail(dot)com> wrote:
> Since Postgres only supports encodings that are ASCII supersets, I
> don't believe that I have to consider encoding - only my clients do.
>

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 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.

-- 
greg

In response to

Responses

pgsql-hackers by date

Next:From: Kevin GrittnerDate: 2011-02-23 05:20:25
Subject: Re: SSI bug?
Previous:From: Peter GeogheganDate: 2011-02-23 04:16:58
Subject: Correctly producing array literals for prepared statements

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group