diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2018-05-08 14:36:31 -0400 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2018-05-08 14:36:31 -0400 |
commit | 831f5d11ec7bb8a693c581720d014b3a5ad7d446 (patch) | |
tree | ab3f346b1a303248329246757e8b5b38d8bf422c /src/backend/utils/adt/jsonfuncs.c | |
parent | 3a675f729ea96c8bf3e764996a0c743500e564ef (diff) | |
download | postgresql-831f5d11ec7bb8a693c581720d014b3a5ad7d446.tar.gz postgresql-831f5d11ec7bb8a693c581720d014b3a5ad7d446.zip |
Refine error messages
"JSON" when not referring to a data type should be upper case.
Diffstat (limited to 'src/backend/utils/adt/jsonfuncs.c')
-rw-r--r-- | src/backend/utils/adt/jsonfuncs.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/utils/adt/jsonfuncs.c b/src/backend/utils/adt/jsonfuncs.c index 2f701603a26..b95f5a7c40a 100644 --- a/src/backend/utils/adt/jsonfuncs.c +++ b/src/backend/utils/adt/jsonfuncs.c @@ -2326,12 +2326,12 @@ populate_array_report_expected_array(PopulateArrayContext *ctx, int ndim) if (ctx->colname) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("expected json array"), + errmsg("expected JSON array"), errhint("See the value of key \"%s\".", ctx->colname))); else ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("expected json array"))); + errmsg("expected JSON array"))); } else { @@ -2348,13 +2348,13 @@ populate_array_report_expected_array(PopulateArrayContext *ctx, int ndim) if (ctx->colname) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("expected json array"), + errmsg("expected JSON array"), errhint("See the array element %s of key \"%s\".", indices.data, ctx->colname))); else ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("expected json array"), + errmsg("expected JSON array"), errhint("See the array element %s.", indices.data))); } @@ -2390,7 +2390,7 @@ populate_array_check_dimension(PopulateArrayContext *ctx, int ndim) else if (ctx->dims[ndim] != dim) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("malformed json array"), + errmsg("malformed JSON array"), errdetail("Multidimensional arrays must have " "sub-arrays with matching dimensions."))); |