pgsql: Fix a couple of cases of JSON output.

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix a couple of cases of JSON output.
Date: 2012-02-20 20:06:09
Message-ID: E1RzZUv-0001jm-Nc@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2012-02-20 21:22:22 pgsql: Don't reject threaded Python on FreeBSD.
Previous Message Tom Lane 2012-02-20 05:53:40 pgsql: Fix regex back-references that are directly quantified with *.