Re: handling unconvertible error messages

From: Victor Wagner <vitus(at)wagner(dot)pp(dot)ru>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: handling unconvertible error messages
Date: 2016-08-13 10:16:40
Message-ID: 20160813131640.30527d34@wagner.wagner.home
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, 13 Aug 2016 09:24:47 +0000
Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)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(at)wagner(dot)pp(dot)ru>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Vladimir Sitnikov 2016-08-13 10:59:43 Re: Slowness of extended protocol
Previous Message Vladimir Sitnikov 2016-08-13 09:24:47 Re: handling unconvertible error messages