]> granicus.if.org Git - postgresql/commit
Fix a couple of cases of JSON output.
authorAndrew Dunstan <andrew@dunslane.net>
Mon, 20 Feb 2012 20:01:03 +0000 (15:01 -0500)
committerAndrew Dunstan <andrew@dunslane.net>
Mon, 20 Feb 2012 20:01:03 +0000 (15:01 -0500)
commit83fcaffea2b55152e45fdcaf3fdaf4c0c89f65ce
tree03fb078fb180794ea513b895963d537a3d4b21f3
parent5223f96d92fd6fb6fcf260da9f9cb111831f0b37
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.
src/backend/utils/adt/json.c
src/test/regress/expected/json.out
src/test/regress/sql/json.sql