From: Laurenz Albe <laurenz.albe@cybertec.at>
To: bugs-postgresql@antipoul.fr
To: pgsql-docs@lists.postgresql.org
Subject: Re: Mention invalid null byte sequence
Date: Mon, 07 Dec 2020 10:02:43 +0100
Message-ID: <0f0470f6d8c543793d2b71913cb230daea1aef3a.camel@cybertec.at> (raw)
In-Reply-To: <160720552914.710.16625261471128631268@wrigleys.postgresql.org>
References: <160720552914.710.16625261471128631268@wrigleys.postgresql.org>
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
Attachments:Document-that-NUL-characters-are-not-supported.patch (text/x-patch, 600B) downloaddiff --git a/doc/src/sgml/charset.sgml b/doc/src/sgml/charset.sgmlindex 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>
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: laurenz.albe@cybertec.at, bugs-postgresql@antipoul.fr, pgsql-docs@lists.postgresql.org
Subject: Re: Mention invalid null byte sequence
In-Reply-To: <0f0470f6d8c543793d2b71913cb230daea1aef3a.camel@cybertec.at>
* 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