Re: [HACKERS] Optional message to user when terminating/cancellingbackend - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: [HACKERS] Optional message to user when terminating/cancellingbackend
Date
Msg-id AD56BE31-0D74-4986-BCCB-1AADD14C5886@yesql.se
Whole thread Raw
In response to Re: [HACKERS] Optional message to user when terminating/cancelling backend  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: [HACKERS] Optional message to user when terminating/cancelling backend
List pgsql-hackers
> On 12 Aug 2018, at 07:42, Pavel Stehule <pavel.stehule@gmail.com> wrote:
> 2018-08-12 0:17 GMT+02:00 Daniel Gustafsson <daniel@yesql.se <mailto:daniel@yesql.se>>:
> > On 6 Aug 2018, at 09:47, Heikki Linnakangas <hlinnaka@iki.fi <mailto:hlinnaka@iki.fi>> wrote:

> > What happens if the message contains non-ASCII characters, and the sending backend is connected to database that
usesa different encoding than the backend being signaled? 
>
> In the current state of the patch, instead of the message you get:
>
>     FATAL: character with byte sequence 0xe3 0x82 0xbd in encoding "UTF8" has
>            no equivalent in encoding “ISO_8859_5"
>
> Where this code fails? Isn't somewhere upper where string literals are translated? Then this message is ok.

This happens for example when a UTF-8 backend sends a message with japanese
characters to a backend using ISO_8859_5.  So the code works as expected, but
it’s not a very good user experience.

cheers ./daniel

pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Tid scan improvements
Next
From: Fabien COELHO
Date:
Subject: Re: libpq should append auth failures, not overwrite