From: Álvaro Herrera Date: Tue, 21 Jul 2026 11:27:15 +0000 (+0200) Subject: Unify error messages X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=02597b42e5ff0df44e6a089801b7f6830ad19d83;p=thirdparty%2Fpostgresql.git Unify error messages --- diff --git a/src/backend/catalog/catalog.c b/src/backend/catalog/catalog.c index be8791af875..cf9b88b3e25 100644 --- a/src/backend/catalog/catalog.c +++ b/src/backend/catalog/catalog.c @@ -717,8 +717,8 @@ pg_nextoid(PG_FUNCTION_ARGS) if (attform->atttypid != OIDOID) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("column \"%s\" is not of type oid", - NameStr(*attname)))); + errmsg("column \"%s\" is not of type %s", + NameStr(*attname), "oid"))); if (IndexRelationGetNumberOfKeyAttributes(idx) != 1 || idx->rd_index->indkey.values[0] != attno) diff --git a/src/backend/utils/adt/tsvector_op.c b/src/backend/utils/adt/tsvector_op.c index 53a9541e89f..ea62efebdce 100644 --- a/src/backend/utils/adt/tsvector_op.c +++ b/src/backend/utils/adt/tsvector_op.c @@ -2770,8 +2770,8 @@ tsvector_update_trigger(PG_FUNCTION_ARGS, bool config_column) TSVECTOROID)) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("column \"%s\" is not of tsvector type", - trigger->tgargs[0]))); + errmsg("column \"%s\" is not of type %s", + trigger->tgargs[0], "tsvector"))); /* Find the configuration to use */ if (config_column) @@ -2788,8 +2788,8 @@ tsvector_update_trigger(PG_FUNCTION_ARGS, bool config_column) REGCONFIGOID)) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("column \"%s\" is not of regconfig type", - trigger->tgargs[1]))); + errmsg("column \"%s\" is not of type %s", + trigger->tgargs[1], "regconfig"))); datum = SPI_getbinval(rettuple, rel->rd_att, config_attr_num, &isnull); if (isnull)