| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
| Cc: | Bruce Momjian <bruce(at)momjian(dot)us>, email(at)andersonloyola(dot)com(dot)br, pgsql-bugs(at)postgresql(dot)org |
| Subject: | Re: BUG #8676: Bug Money JSON |
| Date: | 2013-12-17 15:31:08 |
| Message-ID: | 10585.1387294268@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs pgsql-hackers |
Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>> On Wed, Dec 11, 2013 at 02:30:04PM +0000, email(at)andersonloyola(dot)com(dot)br wrote:
>>> postgres=# SELECT to_json(a) FROM (VALUES(1000::money)) a(salario);
>>> to_json
>>> -----------------------
>>> {"salario":$1,000.00}
>>> (1 row)
> Yeah. I'll have a look. In fact this looks like it's possibly a couple
> of bugs. The JSON produced by the first query is not valid. It looks
> like we might need to force money to text unconditionally.
Isn't this simply failure to quote the string properly? What drives
to_json's choice of whether to quote or not, anyway?
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrew Dunstan | 2013-12-17 16:16:40 | Re: BUG #8676: Bug Money JSON |
| Previous Message | David Johnston | 2013-12-17 15:25:01 | Re: BUG #8678: Multiple evaluation single volatile function in select statement |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jim Nasby | 2013-12-17 15:59:39 | Re: patch: make_timestamp function |
| Previous Message | Tom Lane | 2013-12-17 15:19:48 | Re: commit fest 2013-11 final report |