From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Further cleanup of JSON-specific error messages. |
Date: | 2014-08-09 20:35:45 |
Message-ID: | E1XGDMf-0007t5-Tv@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Further cleanup of JSON-specific error messages.
Fix an obvious typo in json_build_object()'s complaint about invalid
number of arguments, and make the errhint a bit more sensible too.
Per discussion about how to word the improved hint, change the few places
in the documentation that refer to JSON object field names as "names" to
say "keys" instead, since that's what we've said in the vast majority of
places in the docs. Arguably "name" is more correct, since that's the
terminology used in RFC 7159; but we're stuck with "key" in view of the
naming of json_object_keys() so let's at least be self-consistent.
I adjusted a few code comments to match this as well, and failed to
resist the temptation to clean up some odd whitespace choices in the
same area, as well as a useless duplicate PG_ARGISNULL() check. There's
still quite a bit of code that uses the phrase "field name" in non-user-
visible ways, so I left those usages alone.
Branch
------
REL9_4_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/84dd042a51e702a3761250e2ce801b3fb2b879c3
Modified Files
--------------
doc/src/sgml/func.sgml | 12 ++++++------
src/backend/utils/adt/json.c | 26 +++++++++-----------------
2 files changed, 15 insertions(+), 23 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2014-08-09 21:31:30 | pgsql: Clean up handling of unknown-type inputs in json_build_object an |
Previous Message | Tom Lane | 2014-08-09 17:47:22 | pgsql: Reject duplicate column names in foreign key referenced-columns |