Re: handling unconvertible error messages - Mailing list pgsql-hackers

From Victor Wagner
Subject Re: handling unconvertible error messages
Date
Msg-id 20160813131640.30527d34@wagner.wagner.home
Whole thread Raw
In response to Re: handling unconvertible error messages  (Vladimir Sitnikov <sitnikov.vladimir@gmail.com>)
Responses Re: handling unconvertible error messages  (Vladimir Sitnikov <sitnikov.vladimir@gmail.com>)
Re: handling unconvertible error messages  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Vladimir Sitnikov
Date:
Subject: Re: handling unconvertible error messages
Next
From: Vladimir Sitnikov
Date:
Subject: Re: Slowness of extended protocol