From 314e0ffc1efb854f603e325c13a39ba871aebbf5 Mon Sep 17 00:00:00 2001
From: Erik Wienhold <ewie@ewie.name>
Date: Sun, 5 May 2024 02:15:53 +0200
Subject: [PATCH] Document nchar data type alias

Also mention that we support national character string constants.
---
 doc/src/sgml/datatype.sgml | 6 +++---
 doc/src/sgml/syntax.sgml   | 7 +++++++
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml
index 6646820d6a..3063b7e2cb 100644
--- a/doc/src/sgml/datatype.sgml
+++ b/doc/src/sgml/datatype.sgml
@@ -1234,9 +1234,9 @@ SELECT '52093.89'::money::numeric::float8;
 
    <para>
     The type name <type>varchar</type> is an alias for <type>character
-    varying</type>, while <type>bpchar</type> (with length specifier) and
-    <type>char</type> are aliases for <type>character</type>.  The
-    <type>varchar</type> and <type>char</type> aliases are defined in the
+    varying</type>, while <type>bpchar</type> (with length specifier),
+    <type>nchar</type>, and <type>char</type> are aliases for <type>character</type>.
+    The <type>varchar</type> and <type>char</type> aliases are defined in the
     <acronym>SQL</acronym> standard;  <type>bpchar</type> is a
     <productname>PostgreSQL</productname> extension.
    </para>
diff --git a/doc/src/sgml/syntax.sgml b/doc/src/sgml/syntax.sgml
index 4dfbbd0862..6579b2908a 100644
--- a/doc/src/sgml/syntax.sgml
+++ b/doc/src/sgml/syntax.sgml
@@ -334,6 +334,13 @@ SELECT 'foo'      'bar';
      by <acronym>SQL</acronym>; <productname>PostgreSQL</productname> is
      following the standard.)
     </para>
+
+    <para>
+     <productname>PostgreSQL</productname> also accepts national character
+     string constants (<literal>n'sample'</literal>) for compliance with
+     the <acronym>SQL</acronym> standard.  Those are essentially the same as
+     regular string constants.
+    </para>
    </sect3>
 
    <sect3 id="sql-syntax-strings-escape">
-- 
2.45.0

