BUG #8398: to_json(''::hstore) gives invalid JSON

Поиск
Список
Период
Сортировка
От martin.kevin@gmail.com
Тема BUG #8398: to_json(''::hstore) gives invalid JSON
Дата
Msg-id E1VE15h-0006Zf-L8@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #8398: to_json(''::hstore) gives invalid JSON  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      8398
Logged by:          Kevin Martin
Email address:      martin.kevin@gmail.com
PostgreSQL version: 9.3rc1
Operating system:   Ubuntu 10.04
Description:

to_json() returns an invalid JSON value when called on an empty hstore
value. The first two statements below behave as expected, the third (with an
empty hstore) fails:


config_test=# SELECT to_json(q) FROM (SELECT '' AS v) AS q;
 to_json
----------
 {"v":""}
(1 row)


config_test=# SELECT to_json(q) FROM (SELECT ARRAY[]::INT[] AS v) AS q;
 to_json
----------
 {"v":[]}
(1 row)


config_test=# SELECT to_json(q) FROM (SELECT ''::HSTORE AS v) AS q;
 to_json
---------
 {"v":}
(1 row)


The returned JSON will fail to be parsed by a conformant JSON parser.

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

Предыдущее
От: Nick Carenza
Дата:
Сообщение: uuid.h: present but cannot be compiled
Следующее
От: borz_off@cs.msu.su
Дата:
Сообщение: BUG #8399: inconsistent input of multidimensional arrays