[GENERAL] Support for \u0000?

Поиск
Список
Период
Сортировка
От Matthew Byrne
Тема [GENERAL] Support for \u0000?
Дата
Msg-id CAE37PpOn=McGeokmny4tm4FTHmXSG4KydgUJemKqT9XxkrrTmg@mail.gmail.com
обсуждение исходный текст
Ответы Re: [GENERAL] Support for \u0000?
Список pgsql-general
Are there any plans to support \u0000 in JSONB and, relatedly, UTF code point 0 in TEXT?  To the best of my knowledge \u0000 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 by using the JSON type, which allows \u0000 to be stored, but this is far from ideal because it can't be cast to TEXT or JSONB and can't even be accessed:

mydb=# select '{"thing":"\u0000"}'::json->>'thing';
ERROR:  unsupported Unicode escape sequence
DETAIL:  \u0000 cannot be converted to text.
CONTEXT:  JSON data, line 1: {"thing":...

Regards,

Matt

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

Предыдущее
От: Clodoaldo Neto
Дата:
Сообщение: [GENERAL] Failed DNF dependency in Fedora
Следующее
От: "dilaz03 ."
Дата:
Сообщение: [GENERAL] Planner statistics usage for composite type