Re: [GENERAL] Support for \u0000?

Поиск
Список
Период
Сортировка
От Matthew Byrne
Тема Re: [GENERAL] Support for \u0000?
Дата
Msg-id CAE37PpOKCs9aBvOPtMbwJ7UvFYSZWAMia=WOp0U2tNKWgnGE9A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [GENERAL] Support for \u0000?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
I see.  Thanks for the quick responses!

On Wed, Jul 19, 2017 at 11:32 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Matthew Byrne <mjw.byrne@gmail.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

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [GENERAL] Support for \u0000?
Следующее
От: Alessandro_feliz
Дата:
Сообщение: [GENERAL] Postgres csv logging