Re: Support for \u0000?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Matthew Byrne <mjw(dot)byrne(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Support for \u0000?
Date: 2017-07-19 22:32:53
Message-ID: 3650.1500503573@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Matthew Byrne <mjw(dot)byrne(at)gmail(dot)com> writes:
> Would a more feasible approach be to introduce new types (say, TEXT2 and
> JSONB2 - or something better-sounding) which are the same as the old ones
> but add for support \u0000 and UTF 0? This would isolate nul-containing
> byte arrays to the implementations of those types and keep backward
> compatibility by leaving TEXT and JSONB alone.

The problem is not inside those datatypes; either text or jsonb could
trivially store \0 bytes. The problem is passing such values through
APIs that don't support it. Changing those APIs would affect *all*
datatypes.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Matthew Byrne 2017-07-19 22:36:06 Re: Support for \u0000?
Previous Message Matthew Byrne 2017-07-19 22:21:58 Re: Support for \u0000?