Re: [GENERAL] Support for \u0000?

2017-07-21 Thread Matthew Byrne
I see. Thanks for the quick responses! On Wed, Jul 19, 2017 at 11:32 PM, Tom Lane wrote: > Matthew Byrne writes: > > Would a more feasible approach be to introduce new types (say, TEXT2 and > > JSONB2 - or something better-sounding) which are the same

Re: [GENERAL] Support for \u0000?

2017-07-21 Thread Matthew Byrne
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 \u and UTF 0? This would isolate nul-containing byte

Re: [GENERAL] Support for \u0000?

2017-07-19 Thread Tom Lane
Matthew Byrne 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 \u and UTF 0? This would isolate nul-containing > byte arrays to the

Re: [GENERAL] Support for \u0000?

2017-07-19 Thread Tom Lane
Matthew Byrne writes: > Are there any plans to support \u 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

[GENERAL] Support for \u0000?

2017-07-19 Thread Matthew Byrne
Are there any plans to support \u in JSONB and, relatedly, UTF code point 0 in TEXT? To the best of my knowledge \u is valid in JSON and code point 0 is valid in UTF-8 but Postgres rejects both, which severely limits its usefulness in many cases. I am currently working around the issue