Re: handling unconvertible error messages

Поиск
Список
Период
Сортировка
От Victor Wagner
Тема Re: handling unconvertible error messages
Дата
Msg-id 20160813131640.30527d34@wagner.wagner.home
обсуждение исходный текст
Ответ на Re: handling unconvertible error messages  (Vladimir Sitnikov <sitnikov.vladimir@gmail.com>)
Ответы Re: handling unconvertible error messages  (Vladimir Sitnikov <sitnikov.vladimir@gmail.com>)
Re: handling unconvertible error messages  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sat, 13 Aug 2016 09:24:47 +0000
Vladimir Sitnikov <sitnikov.vladimir@gmail.com> wrote:

> Victor>We don't have 190 message  catalog translations in the
> Victor>PostgreSQL. So problem with encoding for messages is quite
> Victor>limited.
> 
> Even though the number of translations is limited, there's a problem
> when trying to tell one "one-byte-encoding" from another "one-byte"
> one. It would be so much better if ServerErrorMessages included
> encoding right in the message itself.

I think it is better to avoid such a problem and fix system so server
would never send a message in the encoding, different from client one.
It is not a client job to convert encodings.

In most cases server does know which encoding client requests from the
very first protocol message. (if it is startup message). 
So, server can easily tell if it is able to convert NLS messages into
the client desired encoding, and if not - fall back to untranslated
messages.





--                                   Victor Wagner <vitus@wagner.pp.ru>



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

Предыдущее
От: Vladimir Sitnikov
Дата:
Сообщение: Re: handling unconvertible error messages
Следующее
От: Vladimir Sitnikov
Дата:
Сообщение: Re: Slowness of extended protocol