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