Revisit error message details for JSON input parsing.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 80edfd76591fdb9beec061de3c05ef4e9d96ce56
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2012-06-13T23:43:35Z
Releases: 9.2.0
Revisit error message details for JSON input parsing.

Instead of identifying error locations only by line number (which could
be entirely unhelpful with long input lines), provide a fragment of the
input text too, placing this info in a new CONTEXT entry.  Make the
error detail messages conform more closely to style guidelines, fix
failure to expose some of them for translation, ensure compiler can
check formats against supplied parameters.

Files

PathChange+/−
src/backend/utils/adt/json.c modified +161 −50
src/test/regress/expected/json.out modified +63 −36