Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s3ujx-00Gb7b-2Q for pgsql-docs@arkaria.postgresql.org; Mon, 06 May 2024 09:34:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1s3uju-00BvOx-EI for pgsql-docs@arkaria.postgresql.org; Mon, 06 May 2024 09:34:31 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s3ujt-00BvOo-G6 for pgsql-docs@lists.postgresql.org; Mon, 06 May 2024 09:34:31 +0000 Received: from fout2-smtp.messagingengine.com ([103.168.172.145]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s3ujn-001hOn-6M for pgsql-docs@lists.postgresql.org; Mon, 06 May 2024 09:34:29 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfout.nyi.internal (Postfix) with ESMTP id 7AF231380362; Mon, 6 May 2024 05:34:21 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 06 May 2024 05:34:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm2; t=1714988061; x=1715074461; bh=ARSCenOI+K5ZuYyFYmYC+jEwyFlepoHP PFvNouwZq08=; b=NujWuVgOV8/NMWmChST0p0ri6f//kBJZHPMiPXI0IRWCEKlT GbcFRMLYnRjTbDV/wOs1SyyS62/5ZtRHwPSNKv3clyPBVKHjBoM6t9dHoLavb9Kn IuPMbqsls1F+8uYJCTSnk4zw1KIdJG8EW58O3+0xLu9zNJSCEXOKON+xXj0kEsAx j8tCoZzyME1iGqQwI0Sn/WJ1RaFMMlqQRVjA1HZpjw7f85+jMSnHf3cbjDlsrVJa bmwxv7642c2LdxyjhbgWqdJ04WU2icMA9h4BgHQ2ippeojl+UOF+gWFmt8zn5aS2 P0ZWgjFFgqXtNOCG+EuyOyhy4cGkTMNghPA0WQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1714988061; x= 1715074461; bh=ARSCenOI+K5ZuYyFYmYC+jEwyFlepoHPPFvNouwZq08=; b=X zbxH8iVf/s3O+ohaMxzsYa0sZ9HU3j316HmyaBIEI7T2DxrAIasmKBaBV1fdQU99 edVxjMZuLSfpT2aZ9+8NEw1535nA+8rlVM1lZ65/vAuaigbbqgFJphJBBiJPqs/C KAKrNPKY15E+fmqG1+XE8baA2blzk77HmZNd3VTG4n/mjuYf/EmH32QVlE1fS7wJ Vnpjn6MT6YP5TwWxBuz8iFgHasefXfygl8B5q7r2Zbh5UoEZGxfglmHFnORWvLKo IzTlIEc+Fvq6AoKI+3ce10UH84znOqewX6rnG4naONSakufk2zkuYihgOBnLnDoX GJnSI42VAalHBcTkn+WQw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvddviedgudekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrsegvihhsvghnthhrrghuthdrohhrgh eqnecuggftrfgrthhtvghrnhepgfejtdfhkeeftdeugfeileehteeljeeghfeuledthfeu tedvffdukeefjefhgeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomhepphgvthgvrhesvghishgvnhhtrhgruhhtrdhorhhg X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 6 May 2024 05:34:20 -0400 (EDT) Message-ID: <0924daa4-53e8-40ee-b8a7-73307a8ea34a@eisentraut.org> Date: Mon, 6 May 2024 11:34:18 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: nchar is undocumented To: Alvaro Herrera , David Rowley Cc: Erik Wienhold , pgsql-docs@lists.postgresql.org References: <202405060853.t3thj4gr4cpb@alvherre.pgsql> Content-Language: en-US From: Peter Eisentraut In-Reply-To: <202405060853.t3thj4gr4cpb@alvherre.pgsql> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 06.05.24 10:53, Alvaro Herrera wrote: > On 2024-May-05, David Rowley wrote: > >> On Sun, 5 May 2024 at 12:41, Erik Wienhold wrote: >>> So, I think we should either remove that one nchar instance (because it >>> doesn't add any real value) or document it properly. The attached patch >>> does the latter. >> >> It seems easier to do the former, that way we don't need to reconsider >> Peter's concerns about not having enough confidence that it matches >> the standard. >> >> I've included Alvaro and Peter to see what they think. > > Yeah, I too am inclined to remove it. This text was initially written > by Mantrova, Bartunov and Glukhov and posted in [1] without further > explanation, from where it was copied by Glukhov into [2]; the one I > committed is a direct derivate from that. There was no discussion about > nchar specifically that I can see, and at least I simply failed to > realize that nchar was not something that we talk about. > > I'll remove it from the list, and backpatch to 16. Yeah, makes sense to at least undocument it consistently. > If you, Erik, want to spend some time thinking through the standard > definition of NCHAR and whether we conform, perhaps we can document it > more fully. I think the idea of NCHAR and its variants is that you could sort of have two character sets pre-selected: One is the character set set by the client (maybe historically ASCII) and the other is one you designate as the "national" one. Since in PostgreSQL, a given session always has one character set active, this is trivially true, so I think we can leave it like that.