From 314e0ffc1efb854f603e325c13a39ba871aebbf5 Mon Sep 17 00:00:00 2001 From: Erik Wienhold 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; The type name varchar is an alias for character - varying, while bpchar (with length specifier) and - char are aliases for character. The - varchar and char aliases are defined in the + varying, while bpchar (with length specifier), + nchar, and char are aliases for character. + The varchar and char aliases are defined in the SQL standard; bpchar is a PostgreSQL extension. 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 SQL; PostgreSQL is following the standard.) + + + PostgreSQL also accepts national character + string constants (n'sample') for compliance with + the SQL standard. Those are essentially the same as + regular string constants. + -- 2.45.0