Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YCVmV-0002mD-Nq for pgsql-bugs@arkaria.postgresql.org; Sat, 17 Jan 2015 15:59:23 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YCVmV-00053z-98 for pgsql-bugs@arkaria.postgresql.org; Sat, 17 Jan 2015 15:59:23 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YCVmU-00053t-Ky for pgsql-bugs@postgresql.org; Sat, 17 Jan 2015 15:59:22 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YCVmR-00013y-OT for pgsql-bugs@postgresql.org; Sat, 17 Jan 2015 15:59:20 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t0HFxHSX021766; Sat, 17 Jan 2015 10:59:17 -0500 From: Tom Lane To: yoonghm@gmail.com cc: pgsql-bugs@postgresql.org Subject: Re: BUG #12578: row_to_json() and to_json() add 'T' in timestamp field. In-reply-to: <20150117095500.1983.35606@wrigleys.postgresql.org> References: <20150117095500.1983.35606@wrigleys.postgresql.org> Comments: In-reply-to yoonghm@gmail.com message dated "Sat, 17 Jan 2015 09:55:00 +0000" Date: Sat, 17 Jan 2015 10:59:17 -0500 Message-ID: <21765.1421510357@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org yoonghm@gmail.com writes: > row_to_json and to_json replace the space between date and time. This is not a bug; it's an intentional behavioral change. Per the third bullet point in the 9.4 release notes: * When converting values of type date, timestamp or timestamptz to JSON, render the values in a format compliant with ISO 8601 (Andrew Dunstan) Previously such values were rendered according to the current DateStyle setting; but many JSON processors require timestamps to be in ISO 8601 format. If necessary, the previous behavior can be obtained by explicitly casting the datetime value to text before passing it to the JSON conversion function. 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