On Sat, 2020-12-05 at 21:58 +0000, PG Doc comments form wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/13/datatype-character.html > Description: > > I discovered accidentally that PostgreSQL doesn't accept null byte in text > type. It seems that Oracle does (see > https://www.postgresql.org/message-id/de752e01-f36c-821e-9181-cfba78c0fbc8%40propaas.com) > and SQLite does it too. > > So it should written in the character type that null byte are not accepted, > it would make like easier to migrate to PostgreSQL :)
+1; how about the attached patch? Yours, Laurenz Albe
diff --git a/doc/src/sgml/charset.sgml b/doc/src/sgml/charset.sgml index cebc09ef91..7525b5c56e 100644 --- a/doc/src/sgml/charset.sgml +++ b/doc/src/sgml/charset.sgml @@ -1023,6 +1023,11 @@ CREATE COLLATION ignore_accents (provider = icu, locale = 'und-u-ks-level1-kc-tr with most but not all server-side encodings. </para> + <para> + Another restriction is that PostgreSQL does not support the NUL character + (ASCII 0) in character strings, regardless of the character set used. + </para> + <sect2 id="multibyte-charset-supported"> <title>Supported Character Sets</title>