BUG #12578: row_to_json() and to_json() add 'T' in timestamp field. - Mailing list pgsql-bugs

From yoonghm@gmail.com
Subject BUG #12578: row_to_json() and to_json() add 'T' in timestamp field.
Date
Msg-id 20150117095500.1983.35606@wrigleys.postgresql.org
Whole thread Raw
Responses Re: BUG #12578: row_to_json() and to_json() add 'T' in timestamp field.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      12578
Logged by:          Yoong Hor Meng
Email address:      yoonghm@gmail.com
PostgreSQL version: 9.4.0
Operating system:   Linux Ubuntu
Description:

I built the binary manually instead of apt-get instal

row_to_json and to_json replace the space between date and time.

However a post in
http://www.postgresql.org/message-id/CACfv+pLDzZji5C3iS=arBmq074Yi3Ez-+g8pzYF+Qr0dwU=cnQ@mail.gmail.com

shows that other wanted 'T' separater in the date-time string.

To simulate the problem with to_json():

postgres=# select to_json(now());
              to_json
-----------------------------------
 "2015-01-17T17:35:19.47211+08:00"
(1 row)

postgres=# select row_to_json(row(now()));
row_to_json
{"f1":"2015-01-17T17:52:57.387618+08:00"}
(1 row)

pgsql-bugs by date:

Previous
From: richard.t.lloyd@gmail.com
Date:
Subject: BUG #12569: pgAdmin3 throws a warning to syslog on startup
Next
From: Tom Lane
Date:
Subject: Re: BUG #12578: row_to_json() and to_json() add 'T' in timestamp field.