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

Re: v3 protocol & string encoding

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: v3 protocol & string encoding
Date: 2004-05-30 22:23:47
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Tom Lane wrote:
> Oliver Jowett <oliver(at)opencloud(dot)com> writes:
>>1) What encoding is used for strings sent and received during the 
>>startup phase?
> The startup packet itself will not get any encoding conversion AFAIR,
> so one way to look at it is that the data therein must be in server
> encoding.  In practice, there are no strings therein that really need
> conversion anyway.  (If you use characters outside 7-bit-ASCII for user
> or database names, you're going to have much worse problems than just
> this one.)

The encoding of user & database names was my main concern. If they can 
only be 7-bit ASCII in practice, that's easy..

>>2) At what point in the stream does a client_encoding change take effect 
>>-- immediately after the corresponding ParameterStatus message, or at 
>>some other point?
> ParameterStatus is sent when the change is made.

Are the strings in the ParameterStatus encoded with the old or new 
client_encoding? I need to know the point in the stream to switch 
encodings. I suppose this is only an issue if there are pairs of 
encodings where "client_encoding" or the encoding names encode 
differently in the two encodings. Is it safe to assume that 7-bit ASCII 
is always encoded unchanged regardless of the encoding in use?


In response to


pgsql-hackers by date

Next:From: Oliver JowettDate: 2004-05-30 22:45:11
Subject: Re: Delaying the planning of unnamed statements until Bind
Previous:From: Oliver ElphickDate: 2004-05-30 21:53:12
Subject: CVS tip problems

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