pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Erik Wienhold <ewie@ewie.name>
Subject: [PATCH] Document nchar data type alias
Date: Sun, 5 May 2024 02:15:53 +0200

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


--p4x73ewzxxrnlijb--





Message-ID: <no-message-id-9475@localhost>
Permalink:  ../no-message-id-9475@localhost/
Also on:    postgresql.org/message-id/no-message-id-9475@localhost

 · 

reply

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-docs@postgresql.org
  Cc: ewie@ewie.name
  Subject: Re: [PATCH] Document nchar data type alias
  In-Reply-To: <no-message-id-9475@localhost>

* 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