Re: json/jsonb inconsistence - 2

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: json/jsonb inconsistence - 2
Дата
Msg-id 538724E8.2040009@dunslane.net
обсуждение исходный текст
Ответ на json/jsonb inconsistence - 2  (Teodor Sigaev <teodor@sigaev.ru>)
Ответы Re: json/jsonb inconsistence - 2
Список pgsql-hackers
On 05/29/2014 08:00 AM, Teodor Sigaev wrote:
> postgres=# select  '["\u0000"]'::json->0;
>  ?column?
> ----------
>  "\u0000"
> (1 row)
>
> Time: 1,294 ms
> postgres=# select  '["\u0000"]'::jsonb->0;
>  ?column?
> -----------
>  "\\u0000"
> (1 row)
>
> It seems to me that escape_json() is wrongly used in 
> jsonb_put_escaped_value(), right name of escape_json() is a 
> escape_to_json().


That's a bug. I will look into it. I think we might need to special-case 
\u0000 on output, just as we do on input.

cheers

andrew




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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [PATCH] Replacement for OSSP-UUID for Linux and BSD
Следующее
От: Teodor Sigaev
Дата:
Сообщение: Re: json/jsonb inconsistence