Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit c5ba660

Browse files
committed
Doc: explain that the string types can't store \0 (ASCII NUL).
This restriction was mentioned in connection with string literals, but it wasn't made clear that it's a general restriction not just a syntactic limitation in query strings. Per unsigned documentation comment. Discussion: https://postgr.es/m/160720552914.710.16625261471128631268@wrigleys.postgresql.org
1 parent dfd8bf2 commit c5ba660

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

doc/src/sgml/datatype.sgml

+9-4
Original file line numberDiff line numberDiff line change
@@ -1166,6 +1166,14 @@ SELECT '52093.89'::money::numeric::float8;
11661166
regular expressions.
11671167
</para>
11681168

1169+
<para>
1170+
The characters that can be stored in any of these data types are
1171+
determined by the database character set, which is selected when
1172+
the database is created. Regardless of the specific character set,
1173+
the character with code zero (sometimes called NUL) cannot be stored.
1174+
For more information refer to <xref linkend="multibyte"/>.
1175+
</para>
1176+
11691177
<para>
11701178
The storage requirement for a short string (up to 126 bytes) is 1 byte
11711179
plus the actual string, which includes the space padding in the case of
@@ -1203,10 +1211,7 @@ SELECT '52093.89'::money::numeric::float8;
12031211
<para>
12041212
Refer to <xref linkend="sql-syntax-strings"/> for information about
12051213
the syntax of string literals, and to <xref linkend="functions"/>
1206-
for information about available operators and functions. The
1207-
database character set determines the character set used to store
1208-
textual values; for more information on character set support,
1209-
refer to <xref linkend="multibyte"/>.
1214+
for information about available operators and functions.
12101215
</para>
12111216

12121217
<example>

0 commit comments

Comments
 (0)