postgres.git / summary / log / commit / refs
commit 02597b42e5ff0df44e6a089801b7f6830ad19d83
Author: Álvaro Herrera <alvherre@kurilemu.de>
Date: Tue Jul 21 11:27:15 2026 +0000
Unify error messages
src/backend/catalog/catalog.c | 4 ++--
src/backend/utils/adt/tsvector_op.c | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
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)
[parent: 078aac2ed649]