Re: v3 protocol & string encoding

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: v3 protocol & string encoding
Дата
Msg-id 15424.1085931146@sss.pgh.pa.us
обсуждение исходный текст
Ответ на v3 protocol & string encoding  (Oliver Jowett <oliver@opencloud.com>)
Ответы Re: v3 protocol & string encoding
Список pgsql-hackers
Oliver Jowett <oliver@opencloud.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.)

Any client_encoding received from the client is not going to be applied
until after the authentication exchange is complete, so the rest of that
is going to be in server encoding as well.  The only part of this that
seems like it might be an issue is a failure ERROR message would be in
server encoding, but the client wouldn't have any good way to know what
that is ...

> 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.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: CVS tip compiler error with --enable-thread-safety
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Converting postgresql.conf parameters to kilobytes