On Thu, 04 Aug 2016 09:42:10 -0400 Tom Lane <t...@sss.pgh.pa.us> wrote:
> Victor Wagner <vi...@wagner.pp.ru> writes: > > If error occurs during processing of StartMessage protocol message, > > i.e. client request connection to unexisting database, > > ErrorResponse would contain message in the server default locale, > > despite of client encoding being specified in the StartMessage. > > Yeah. I'm inclined to think that we should reset the message locale > to C as soon as we've forked away from the postmaster, and leave it > that way until we've absorbed settings from the startup packet. > Sending messages of this sort in English isn't great, but it's better > than sending completely-unreadable ones. Or is that just my > English-centricity showing? From my russian point of view, english messages are definitely better than transliteration of Russian with latin letters (although it is not completely unreadable), not to mention wrong encoding or lots of question marks. Really, if this response is sent after backend has been forked, problem probably can be easily fixed better way - StartupMessage contain information about desired client encoding, so this information just should be processed earlier than any other information from this message, which can cause errors (such as database name). If this errors are sent from postmaster itself, things are worse, because I don't think that locale subsystem is desined to be reintitalized lots of times in the same process. But postmaster itself can use non-localized messaging. Its messages in the logs are typically analyzed by more or less qualified DBA and system admistrators, not by end user. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers