Re: Implementing full UTF-8 support (aka supporting 0x00)

From: Geoff Winkless <pgsqladmin(at)geoff(dot)dj>
To: Álvaro Hernández Tortosa <aht(at)8kdata(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Implementing full UTF-8 support (aka supporting 0x00)
Date: 2016-08-03 16:35:36
Message-ID: CAEzk6fcgyRkxw35kRrJ9XNFXmgnxS9qAAMh1quo=iN6w+yRP5w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 3 August 2016 at 15:54, Álvaro Hernández Tortosa <aht(at)8kdata(dot)com> wrote:
> Given that 0x00 is a perfectly legal UTF-8 character, I conclude we're
> strictly non-compliant.

It's perhaps worth mentioning that 0x00 is valid ASCII too, and
PostgreSQL has never stored that either.

If you want to start quoting standards, there is in fact specific
mention in the ANSI spec of null terminators in passing strings to
host languages, so if postgresql stored NULs in that way we would end
up with parameters that we couldn't pass to UDFs in a
standards-compliant way.

Geoff

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Sharma 2016-08-03 16:44:25 Re: OldSnapshotTimemapLock information is missing in monitoring.sgml file
Previous Message Tom Lane 2016-08-03 16:27:23 Re: New version numbering practices