From: Tom Lane <tgl@sss.pgh.pa.us>
To: karel.knezourek@gmail.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #10922: row_to_json creates invalid JSON for currecy lower then 1000.
Date: Fri, 11 Jul 2014 17:49:14 -0400
Message-ID: <21420.1405115354@sss.pgh.pa.us> (raw)
In-Reply-To: <20140711040653.2776.16311@wrigleys.postgresql.org>
References: <20140711040653.2776.16311@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
karel.knezourek@gmail.com writes:
> -- 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
Thanks for the report! I can't reproduce this on HEAD. I think it
should have been resolved by commit 0ca6bda8e, but that was done a
couple of days before we stamped 9.4beta1. Are you sure this is
exactly beta1, and not some slightly earlier version? Your
version() output looks like it predates beta1 ...
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, karel.knezourek@gmail.com
Subject: Re: BUG #10922: row_to_json creates invalid JSON for currecy lower then 1000.
In-Reply-To: <21420.1405115354@sss.pgh.pa.us>
References: <20140711040653.2776.16311@wrigleys.postgresql.org> <21420.1405115354@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox