Re: [GENERAL] Support for \u0000?
От | Matthew Byrne |
---|---|
Тема | Re: [GENERAL] Support for \u0000? |
Дата | |
Msg-id | CAE37PpPmsY1DLP1kcghQw6Qv5zZjdUKdGORjRM84u_Kbnd=Z2w@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [GENERAL] Support for \u0000? (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-general |
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@sss.pgh.pa.us> wrote:
Matthew Byrne <mjw.byrne@gmail.com> 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
В списке pgsql-general по дате отправления: