Search Postgresql Archives

Re: Support for \u0000?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for the response Tom.  I understand this would be a mammoth task.

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.

Matt

On Wed, Jul 19, 2017 at 7:30 PM, Tom Lane <tgl@xxxxxxxxxxxxx> wrote:
Matthew Byrne <mjw.byrne@xxxxxxxxx> writes:
> Are there any plans to support \u0000 in JSONB and, relatedly, UTF code
> point 0 in TEXT?

No.  It's basically never going to happen because of the widespread use
of C strings (nul-terminated strings) inside the backend.  Making \0 a
legal member of strings would break all those internal APIs, requiring
touching far more code than anyone would want to do.  It'd likely break
a great deal of client-side code as well.

                        regards, tom lane


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux