Message style fixes
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Tue, 30 Apr 2019 14:00:38 +0000 (10:00 -0400)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Tue, 30 Apr 2019 14:33:37 +0000 (10:33 -0400)
src/backend/access/table/tableamapi.c
src/backend/access/transam/twophase.c
src/backend/commands/indexcmds.c
src/backend/commands/tablecmds.c
src/backend/utils/misc/guc.c
src/test/regress/output/tablespace.source

index bfd713f3af1240b1717e0b2f11f845054bf46f1f..0053dc95cab673ac47b08e367948edc573b0098b 100644 (file)
@@ -109,8 +109,8 @@ check_default_table_access_method(char **newval, void **extra, GucSource source)
 
        if (strlen(*newval) >= NAMEDATALEN)
        {
-               GUC_check_errdetail("default_table_access_method is too long (maximum %d characters).",
-                                                       NAMEDATALEN - 1);
+               GUC_check_errdetail("%s is too long (maximum %d characters).",
+                                                       "default_table_access_method", NAMEDATALEN - 1);
                return false;
        }
 
@@ -131,7 +131,7 @@ check_default_table_access_method(char **newval, void **extra, GucSource source)
                        {
                                ereport(NOTICE,
                                                (errcode(ERRCODE_UNDEFINED_OBJECT),
-                                                errmsg("Table access method \"%s\" does not exist",
+                                                errmsg("table access method \"%s\" does not exist",
                                                                *newval)));
                        }
                        else
index a399c0052d9aeb96cf25419ce931a61248752dd2..21e028283c130450e6d965069593cfb3dd1f66de 100644 (file)
@@ -2190,12 +2190,12 @@ ProcessTwoPhaseBuffer(TransactionId xid,
                if (fromdisk)
                        ereport(ERROR,
                                        (errcode(ERRCODE_DATA_CORRUPTED),
-                                        errmsg("corrupted two-phase state file for transaction \"%u\"",
+                                        errmsg("corrupted two-phase state file for transaction %u",
                                                        xid)));
                else
                        ereport(ERROR,
                                        (errcode(ERRCODE_DATA_CORRUPTED),
-                                        errmsg("corrupted two-phase state in memory for transaction \"%u\"",
+                                        errmsg("corrupted two-phase state in memory for transaction %u",
                                                        xid)));
        }
 
index cb5d91e764079790d3af154488f03baf4b6caf21..fabba3bacd1d39bbb0ed1f5c62e2e7e5fbe3aea9 100644 (file)
@@ -639,7 +639,7 @@ DefineIndex(Oid relationId,
                if (partitioned && tablespaceId == MyDatabaseTableSpace)
                        ereport(ERROR,
                                        (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-                                        errmsg("cannot specify default tablespace for partitioned relation")));
+                                        errmsg("cannot specify default tablespace for partitioned relations")));
        }
        else
        {
index 2d0ef92badf5703d5a5d772679e8550963ee8af4..f6c9cf3b0ec96d9a52849a7338666cb851eab4eb 100644 (file)
@@ -7689,12 +7689,14 @@ ATAddForeignKeyConstraint(List **wqueue, AlteredTableInfo *tab, Relation rel,
                                fkconstraint->fk_upd_action == FKCONSTR_ACTION_CASCADE)
                                ereport(ERROR,
                                                (errcode(ERRCODE_SYNTAX_ERROR),
-                                                errmsg("invalid ON UPDATE action for foreign key constraint containing generated column")));
+                                                errmsg("invalid %s action for foreign key constraint containing generated column",
+                                                               "ON UPDATE")));
                        if (fkconstraint->fk_del_action == FKCONSTR_ACTION_SETNULL ||
                                fkconstraint->fk_del_action == FKCONSTR_ACTION_SETDEFAULT)
                                ereport(ERROR,
                                                (errcode(ERRCODE_SYNTAX_ERROR),
-                                                errmsg("invalid ON DELETE action for foreign key constraint containing generated column")));
+                                                errmsg("invalid %s action for foreign key constraint containing generated column",
+                                                               "ON DELETE")));
                }
        }
 
index f7f726b5aecbd556a43bab59b94fead52cb3c9da..ed51da42341a4a9e7f9ed7f25b35aee4bdf2ee73 100644 (file)
@@ -11639,8 +11639,8 @@ check_recovery_target_name(char **newval, void **extra, GucSource source)
        /* Use the value of newval directly */
        if (strlen(*newval) >= MAXFNAMELEN)
        {
-               GUC_check_errdetail("recovery_target_name is too long (maximum %d characters).",
-                                                       MAXFNAMELEN - 1);
+               GUC_check_errdetail("%s is too long (maximum %d characters).",
+                                                       "recovery_target_name", MAXFNAMELEN - 1);
                return false;
        }
        return true;
index 81e81594a79ea7aff79c90477fe9e0bdafbef21f..7625374d466c1b6da9bf06462a3a73b27f3289e0 100644 (file)
@@ -106,7 +106,7 @@ Tablespace: "regress_tblspace"
 CREATE TABLE testschema.dflt (a int PRIMARY KEY) PARTITION BY LIST (a) TABLESPACE pg_default;
 ERROR:  cannot specify default tablespace for partitioned relations
 CREATE TABLE testschema.dflt (a int PRIMARY KEY USING INDEX TABLESPACE pg_default) PARTITION BY LIST (a);
-ERROR:  cannot specify default tablespace for partitioned relation
+ERROR:  cannot specify default tablespace for partitioned relations
 SET default_tablespace TO 'pg_default';
 CREATE TABLE testschema.dflt (a int PRIMARY KEY) PARTITION BY LIST (a) TABLESPACE regress_tblspace;
 ERROR:  cannot specify default tablespace for partitioned relations