BUG #10922: row_to_json creates invalid JSON for currecy lower then 1000.

Поиск
Список
Период
Сортировка
От karel.knezourek@gmail.com
Тема BUG #10922: row_to_json creates invalid JSON for currecy lower then 1000.
Дата
Msg-id 20140711040653.2776.16311@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #10922: row_to_json creates invalid JSON for currecy lower then 1000.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      10922
Logged by:          Karel Knezourek
Email address:      karel.knezourek@gmail.com
PostgreSQL version: 9.4beta1
Operating system:   linux
Description:

select version();
--"PostgreSQL 9.4devel on x86_64-unknown-linux-gnu, compiled by gcc (GCC)
4.4.7 20120313 (Red Hat 4.4.7-4), 64-bit"
--"PostgreSQL 9.3.4, compiled by Visual C++ build 1600, 64-bit"

-- TEST CASE
CREATE TABLE test
(
  currency money
);

INSERT INTO test(currency) SELECT '1.34'::float8::numeric::money;
INSERT INTO test(currency) SELECT '1000.34'::float8::numeric::money;
SELECT row_to_json(t) FROM (SELECT * FROM TEST) t;
--{"currency":1,34 Kč} NOT OK !!! it is not valid JSON without double quotes

--{"currency":"1 000,34 Kč"} OK

drop table test;

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

Предыдущее
От: Mitu Verma
Дата:
Сообщение: Re: BUG #10888: application is getting hanged in the poll() function of libpq.so.
Следующее
От: gerke.ephorus@gmail.com
Дата:
Сообщение: BUG #10925: Documentation not clear on copy options containing '_'