From: Tom Lane <tgl@sss.pgh.pa.us>
To: Paul Draper <paulddraper@gmail.com>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: Support for U+0000 text
Date: Wed, 06 Mar 2019 22:40:31 -0500
Message-ID: <21019.1551930031@sss.pgh.pa.us> (raw)
In-Reply-To: <CAApx4VRT0-Zfz7AMzTi4e323tAP6pSbP7gCtKpS_nyFa+mnSxQ@mail.gmail.com>
References: <CAApx4VRT0-Zfz7AMzTi4e323tAP6pSbP7gCtKpS_nyFa+mnSxQ@mail.gmail.com>
Paul Draper <paulddraper@gmail.com> writes:
> When inserting the U+0000 (NULL) character, PostgreSQL errors:
> ERROR: invalid byte sequence for encoding "UTF8": 0x00
> I understand I could not use the text type, but given that this is a valid
> Unicode character, is there a reason this is not supported?
Yes: internally, the text representation of all data types is a C string,
ie a \0-terminated string. That's not something that's practical to
change.
regards, tom lane
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-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, paulddraper@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: Support for U+0000 text
In-Reply-To: <21019.1551930031@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