Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jWQEr-00022n-GK for pgsql-hackers@arkaria.postgresql.org; Wed, 06 May 2020 20:01:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jWQEq-0005Ll-Cn for pgsql-hackers@arkaria.postgresql.org; Wed, 06 May 2020 20:01:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jWQEp-0005Le-Qp for pgsql-hackers@lists.postgresql.org; Wed, 06 May 2020 20:01:52 +0000 Received: from anastigmatix.net ([68.171.219.55]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jWQEm-0007vO-W7 for pgsql-hackers@postgresql.org; Wed, 06 May 2020 20:01:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=anastigmatix.net; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:Cc:References:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ZlLV9XK8ZIkjukttS/Tnt+hZOC1ftPqgjz1jOf0sPSs=; b=JhEOP5quJoO6vrU5KLS3J2yvuA +9zgD57UMEoPysiBWXtI+xij9bhrEybMAcwkTNYHTFJ4c15JulK+EwiCFMXhHCQ4yFYG4pK40QO5s vaBqVvDcaj7Ud/7+hJHCAaEF/7V6mQFrGFYz0Yj+qqnWMVk0WvntsXUzm0o2FQAlMRDqbfUvLZo8y pcrM3Oug4udDCQeeHOdIHpSPK/HXPnI+cJsAFW79z35zazqAnD/tW+PSpOnf9dLa/YSYyGmoIcPMR FrGnurFi1BTtMlZgu1JqoHBXh4gN/R8DNbTLYcM2HmBGHRPK7M3mIko6myILsq0e13n62PItMJuH0 5u7B0rFg==; Received: from [184.19.31.139] (port=41615) by bay.acenet.us with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1jWQEj-009HIt-As; Wed, 06 May 2020 16:01:46 -0400 Subject: Re: PG 13 release notes, first draft To: Bruce Momjian , John Naylor References: <20200505031600.GB21752@momjian.us> <20200505143118.GH21752@momjian.us> Cc: PostgreSQL-development From: Chapman Flack X-Enigmail-Draft-Status: N1110 Message-ID: <5EB317A8.1020907@anastigmatix.net> Date: Wed, 6 May 2020 16:01:44 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: <20200505143118.GH21752@momjian.us> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-OutGoing-Spam-Status: No, score=-95.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bay.acenet.us X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - anastigmatix.net X-Get-Message-Sender-Via: bay.acenet.us: authenticated_id: chap@anastigmatix.net X-Authenticated-Sender: bay.acenet.us: chap@anastigmatix.net X-Source: X-Source-Args: X-Source-Dir: X-From-Rewrite: unmodified, already matched List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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.) >> >> + >> +The UTF-8 characters must be available in the server encoding. >> + >> >> 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