diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2014-12-02 18:23:20 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2014-12-02 18:23:32 -0500 |
commit | 7a0be6782b5fc050ec93e386aec13f3100f498a7 (patch) | |
tree | 7be6c5053a6f12455486f20d7b1db455147a1238 /src/backend/utils/adt/jsonb_util.c | |
parent | 10f1f93d8ae2d70fcaf350c62972fb6bac42ffc9 (diff) | |
download | postgresql-7a0be6782b5fc050ec93e386aec13f3100f498a7.tar.gz postgresql-7a0be6782b5fc050ec93e386aec13f3100f498a7.zip |
Improve error messages for malformed array input strings.
Make the error messages issued by array_in() uniformly follow the style
ERROR: malformed array literal: "actual input string"
DETAIL: specific complaint here
and rewrite many of the specific complaints to be clearer.
The immediate motivation for doing this is a complaint from Josh Berkus
that json_to_record() produced an unintelligible error message when
dealing with an array item, because it tries to feed the JSON-format
array value to array_in(). Really it ought to be smart enough to
perform JSON-to-Postgres array conversion, but that's a future feature
not a bug fix. In the meantime, this change is something we agreed
we could back-patch into 9.4, and it should help de-confuse things a bit.
Diffstat (limited to 'src/backend/utils/adt/jsonb_util.c')
0 files changed, 0 insertions, 0 deletions