Re: Protocol V3 questions (StartupMessage and ParameterStatus)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Protocol V3 questions (StartupMessage and ParameterStatus)
Дата
Msg-id 19963.1052403002@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Protocol V3 questions (StartupMessage and ParameterStatus)  (Barry Lind <blind@xythos.com>)
Список pgsql-hackers
Barry Lind <blind@xythos.com> writes:
> Why does the StartupMessage not follow the documentation.  It appears 
> that an extra undocumented \0 is necessary after the parameter 
> name/value pairs.

This is a doc bug; the terminator is supposed to be there.  Thanks for
catching it.

> In looking at the ParameterStatus messages that I am getting back from 
> the server, I have a question about the value being returned for 
> datestyle.  Since I am in the process of converting to the new protocol, 
> I am still sending a query that issues a "set datestyle to 'ISO'".  The 
> ParameterStatus response I get from this query is: "DateStyle\0ISO with 
> US (NonEuropean) conventions".  I would have expected "DateStyle\0ISO". 

Why?  If you do "SHOW datestyle" you will get the full thing.

>      It appears that the value reported by ParameterStatus isn't 
> actually a valid value, since if you try to issue a set datestyle to 
> 'ISO with US (NonEuropean) conventions' you get an error message.

Hmm.  This is not ParameterStatus' fault per se: the SHOW routine for
DateStyle is producing a string that the SET routine for it won't take.

We could either alter the SHOW routine to produce "ISO, US" or alter
the SET routine to take the more verbose string.  Or decree that it's
not a problem.  Any opinions out there?

> It appears (although I haven't verified) that the value will change 
> depending on language since I am assuming the words 'with' and 
> 'conventions' will be translated.

I'm not sure about that.  If so, it's definitely a problem, but I dunno
whether that string gets localized.

> PS.  Tom, since your spam filter blocks my email, I can't send directly 
> to you, thus I need to CC the hackers list.  Can you whitelist me?

Done.  Sorry, didn't realize there was a problem.  But it's probably
good to get this stuff onto the list, as well.

BTW, the protocol doc changes that I committed yesterday evening are not
yet reflected in CVS tip, but I hope to commit fixes today that bring
the code back in sync with the docs.
        regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: could not read transaction log directory ...?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: CIDR in pg_hba.conf