diff options
author | Andrew Dunstan <andrew@dunslane.net> | 2013-12-27 17:04:00 -0500 |
---|---|---|
committer | Andrew Dunstan <andrew@dunslane.net> | 2013-12-27 17:04:00 -0500 |
commit | 29dcf7ded5ef8533376689a85c5b242fc7ace01d (patch) | |
tree | f5429482a33c08ec7059a9a85c9230c496bf3159 /src/backend/access/gist | |
parent | a133bf7031ad5b62281b21dbd6b2097d3d400f0d (diff) | |
download | postgresql-29dcf7ded5ef8533376689a85c5b242fc7ace01d.tar.gz postgresql-29dcf7ded5ef8533376689a85c5b242fc7ace01d.zip |
Properly detect invalid JSON numbers when generating JSON.
Instead of looking for characters that aren't valid in JSON numbers, we
simply pass the output string through the JSON number parser, and if it
fails the string is quoted. This means among other things that money and
domains over money will be quoted correctly and generate valid JSON.
Fixes bug #8676 reported by Anderson Cristian da Silva.
Backpatched to 9.2 where JSON generation was introduced.
Diffstat (limited to 'src/backend/access/gist')
0 files changed, 0 insertions, 0 deletions