Re: char 0x00 - Mailing list pgsql-docs

From Tom Lane
Subject Re: char 0x00
Date
Msg-id 11841.1585232526@sss.pgh.pa.us
Whole thread Raw
In response to char 0x00  (Brett Okken <brett.okken.os@gmail.com>)
Responses Re: char 0x00  (Brett Okken <brett.okken.os@gmail.com>)
List pgsql-docs
Brett Okken <brett.okken.os@gmail.com> writes:
> It might also be helpful to state in the opening paragraph about character
> set support that the NUL character is not supported in any character set
> (except SQL_ASCII).

Uh, it's not supported *anywhere*, period.  If you managed to get the
server to accept a text string with an embedded NUL, I'd like to know
how exactly, because that's a missed validation.

As far as documentation goes, I'd be inclined to address the point
in the page about string data types,

https://www.postgresql.org/docs/current/datatype-character.html

with text along the lines of "The contents of a string value must be
validly encoded according to the database's encoding, and cannot include
the character with code zero".  I'd sort of thought we said that there
already, but I don't see it.

            regards, tom lane



pgsql-docs by date:

Previous
From: Brett Okken
Date:
Subject: char 0x00
Next
From: Brett Okken
Date:
Subject: Re: char 0x00