]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Unify error messages
authorÁlvaro Herrera <alvherre@kurilemu.de>
Tue, 21 Jul 2026 11:27:15 +0000 (13:27 +0200)
committerÁlvaro Herrera <alvherre@kurilemu.de>
Tue, 21 Jul 2026 15:17:54 +0000 (17:17 +0200)
src/backend/catalog/catalog.c
src/backend/utils/adt/tsvector_op.c

index be8791af8754bb91a91c26a0f1253516a0a26b6d..cf9b88b3e258f45fa2aac14a2b876133cedbcd11 100644 (file)
@@ -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)
index 53a9541e89f6a7c2012233a2ab6b2ffb038c8846..ea62efebdcef86becb9e4c3c2d62eb2d65ad0145 100644 (file)
@@ -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)