From: Andrew Dunstan <andrew@dunslane.net>
To: pgsql-committers@postgresql.org
Subject: pgsql: Fix a couple of cases of JSON output.
Date: Mon, 20 Feb 2012 20:06:09 +0000
Message-ID: <E1RzZUv-0001jm-Nc@gemulon.postgresql.org> (raw)
Fix a couple of cases of JSON output.
First, as noted by Itagaki Takahiro, a datum of type JSON doesn't
need to be escaped. Second, ensure that numeric output not in
the form of a legal JSON number is quoted and escaped.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/83fcaffea2b55152e45fdcaf3fdaf4c0c89f65ce
Modified Files
--------------
src/backend/utils/adt/json.c | 25 +++++++++++++++++++++----
src/test/regress/expected/json.out | 30 ++++++++++++++++++++++++++++++
src/test/regress/sql/json.sql | 15 +++++++++++++++
3 files changed, 66 insertions(+), 4 deletions(-)
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-committers@postgresql.org
Cc: andrew@dunslane.net
Subject: Re: pgsql: Fix a couple of cases of JSON output.
In-Reply-To: <E1RzZUv-0001jm-Nc@gemulon.postgresql.org>
References: <E1RzZUv-0001jm-Nc@gemulon.postgresql.org>
* 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