1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-06 07:49:08 +03:00

Unify some error messages

We had essentially the same error in several different wordings.
Unify that.
This commit is contained in:
Peter Eisentraut
2023-08-16 16:17:00 +02:00
parent 1e7ca1189c
commit dca20013eb
4 changed files with 19 additions and 19 deletions

View File

@@ -1083,7 +1083,7 @@ json_object_agg_transfn_worker(FunctionCallInfo fcinfo,
if (!json_unique_check_key(&state->unique_check.check, key, 0))
ereport(ERROR,
errcode(ERRCODE_DUPLICATE_JSON_OBJECT_KEY_VALUE),
errmsg("duplicate JSON key %s", key));
errmsg("duplicate JSON object key value: %s", key));
if (skip)
PG_RETURN_POINTER(state);
@@ -1247,7 +1247,7 @@ json_build_object_worker(int nargs, Datum *args, bool *nulls, Oid *types,
if (!json_unique_check_key(&unique_check.check, key, 0))
ereport(ERROR,
errcode(ERRCODE_DUPLICATE_JSON_OBJECT_KEY_VALUE),
errmsg("duplicate JSON key %s", key));
errmsg("duplicate JSON object key value: %s", key));
if (skip)
continue;

View File

@@ -1955,7 +1955,7 @@ uniqueifyJsonbObject(JsonbValue *object, bool unique_keys, bool skip_nulls)
if (hasNonUniq && unique_keys)
ereport(ERROR,
errcode(ERRCODE_DUPLICATE_JSON_OBJECT_KEY_VALUE),
errmsg("duplicate JSON object key"));
errmsg("duplicate JSON object key value"));
if (hasNonUniq || skip_nulls)
{