pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Brett Okken <brett.okken.os@gmail.com>
Cc: pgsql-docs@lists.postgresql.org, Dave Cramer <davecramer@gmail.com>
Subject: Re: char 0x00
Date: Thu, 26 Mar 2020 10:22:06 -0400
Message-ID: <11841.1585232526@sss.pgh.pa.us> (raw)
In-Reply-To: <CANBJVOH31rJxU=6wYULRyRVg6QfbgWRrFPrxUw1Ss20CR+rcBQ@mail.gmail.com>
References: <CANBJVOH31rJxU=6wYULRyRVg6QfbgWRrFPrxUw1Ss20CR+rcBQ@mail.gmail.com>

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





view thread (6+ messages)  latest in thread

Message-ID: <11841.1585232526@sss.pgh.pa.us>
Permalink:  ../11841.1585232526@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/11841.1585232526@sss.pgh.pa.us

 · 

reply

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: tgl@sss.pgh.pa.us, brett.okken.os@gmail.com, davecramer@gmail.com
  Subject: Re: char 0x00
  In-Reply-To: <11841.1585232526@sss.pgh.pa.us>

* 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