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.96) (envelope-from ) id 1vnQhL-0072it-03 for pgsql-docs@arkaria.postgresql.org; Wed, 04 Feb 2026 00:24:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vnQhI-008BBs-0A for pgsql-docs@arkaria.postgresql.org; Wed, 04 Feb 2026 00:24:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vnQhG-008BBi-2f for pgsql-docs@lists.postgresql.org; Wed, 04 Feb 2026 00:24:43 +0000 Received: from mout-u-107.mailbox.org ([80.241.59.207]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vnQhE-00000000wIC-09ee for pgsql-docs@lists.postgresql.org; Wed, 04 Feb 2026 00:24:42 +0000 Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-107.mailbox.org (Postfix) with ESMTPS id 4f5LhN63fgz9v9q; Wed, 4 Feb 2026 01:24:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ewie.name; s=MBO0001; t=1770164677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=sQ85V5gsLDwUUxYdOOLTybbyWOQ/TCm6WqRSCL4snZ0=; b=D601TV769TrgKkpYwGWGxjpueOjafaws0pj0loTYXW2Z/FSSn/BenBlilh3s+TsacgAQ/C sqIbgMjl8DCryK7/UHvsgbazpy8RkCK3QXGKq/kxbTWGAXQicBm+hqefbKS80AwM2QIbaQ jBaC1s5mNOHVF3tRXVVbZBcxYDmA5i8aMXb7cQ6dJ3t+UGSYYfsNRVT4CMbd4mNBCPdzhV CR4JTEBpqtppAyTOuv213o2YHdXEhiyPU+0dk5SjZjhekqKYe+ooRuSypgs27nkXsi9I3o Ji4EPxFWvhU0E129RpLb+9xyaNBn8kq1oUoLn0rS28FIwXAl5wyS+JW/Ad34Qw== Authentication-Results: outgoing_mbo_mout; dkim=none; spf=pass (outgoing_mbo_mout: domain of ewie@ewie.name designates 2001:67c:2050:b231:465::102 as permitted sender) smtp.mailfrom=ewie@ewie.name Date: Wed, 4 Feb 2026 01:24:34 +0100 From: Erik Wienhold To: Hoda Salim Cc: pgsql-docs@lists.postgresql.org Subject: Re: [PATCH] docs: document N'...' national character string literal syntax Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4f5LhN63fgz9v9q List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2026-02-02 21:04 +0100, Hoda Salim wrote: > > nchar is an alias of bpchar. There's no cast to char behind the scenes > > since that would truncate the string: > > > > select n'foo', 'foo'::character; > > bpchar | bpchar > > --------+-------- > > foo | f > > (1 row) > > Thank you for catching this! I verified the behavior and updated the > documentation to correctly state that N'...' is equivalent to a bpchar > literal. Thanks! The text looks good now. But please fix the indentation of the second paragraph (should be one space per level). Your first patch was correct in that regard. > > Should we also mention the nchar alias in [4]? > > [4] https://www.postgresql.org/docs/current/datatype-character.html > > I'm happy to add that in a v3 if you think it belongs in this patch. > I wasn't sure if it would be preferred separately or together. I'd prefer a single patch with both changes to have an atomic change. But in the end it's up to the committer, not me. -- Erik Wienhold