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:
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user