From: Chapman Flack <chap@anastigmatix.net>
To: Bruce Momjian <bruce@momjian.us>
To: John Naylor <john.naylor@2ndquadrant.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: PG 13 release notes, first draft
Date: Wed, 6 May 2020 16:01:44 -0400
Message-ID: <5EB317A8.1020907@anastigmatix.net> (raw)
In-Reply-To: <20200505143118.GH21752@momjian.us>
References: <20200505031600.GB21752@momjian.us>
<CACPNZCugECZv_5TNFFQ+R9Pp15PP5426oAstC1g7kTS1aLgrnw@mail.gmail.com>
<20200505143118.GH21752@momjian.us>
On 05/05/20 10:31, Bruce Momjian wrote:
> On Tue, May 5, 2020 at 09:20:39PM +0800, John Naylor wrote:
>> ... This patch is
>> about the server encoding, which formerly needed to be utf-8 for
>> non-ascii characters. (I think the client encoding doesn't matter as
>> long as ascii bytes are represented.)
>>
>> +<para>
>> +The UTF-8 characters must be available in the server encoding.
>> +</para>
>>
>> Same here, s/UTF-8/Unicode/.
>
> OK, new text is:
>
> Allow Unicode escapes, e.g., E'\u####', in clients that don't use UTF-8
> encoding (Tom Lane)
>
> The Unicode characters must be available in the server encoding.
>
> I kept the "UTF-8 encoding" since that is the only Unicode encoding we
> support.
My understanding also was that it matters little to this change what the
/client's/ encoding is.
There used to be a limitation of the server's lexer that would reject
Unicode escapes whenever the /server's/ encoding wasn't UTF-8 (even
if the server's encoding contained the characters the escapes represent).
I think that limitation is what was removed.
I don't think the client encoding comes into it at all. Sure, you could
just include the characters literally if they are in the client encoding,
but you might still choose to express them as escapes, and if you do they
get passed that way to the server for interpretation.
I had assumed the patch applied to all of the forms U&'\####',
U&'\+######', E'\u####', and E'\U######' but I don't think I read
the patch to be sure of that.
Regards,
-Chap
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: chap@anastigmatix.net, bruce@momjian.us, john.naylor@2ndquadrant.com
Subject: Re: PG 13 release notes, first draft
In-Reply-To: <5EB317A8.1020907@anastigmatix.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox