Re: Mention invalid null byte sequence

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: bugs-postgresql@antipoul.fr, pgsql-docs@lists.postgresql.org
Date: 2020-12-07T20:27:22Z
Lists: pgsql-docs

Attachments

Laurenz Albe <laurenz.albe@cybertec.at> writes:
> 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:
>> 
>> 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?

I had thought that this was already documented, but after digging around
I can only find it mentioned in the contexts of saying that literal
strings and quoted identifiers can't contain \0.  So yeah, we need to
improve that.

I agree with the submitter that the place one would expect to read about
this is in datatype-character.html.  So I'd propose the attached.
Maybe there's reason to repeat the info in charset.sgml, but it seems
like more of a datatype limitation than a character set issue.

			regards, tom lane

Commits

  1. Doc: explain that the string types can't store \0 (ASCII NUL).