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;
        }
 
                        {
                                ereport(NOTICE,
                                                (errcode(ERRCODE_UNDEFINED_OBJECT),
-                                                errmsg("Table access method \"%s\" does not exist",
+                                                errmsg("table access method \"%s\" does not exist",
                                                                *newval)));
                        }
                        else
 
                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)));
        }
 
 
                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
        {
 
                                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")));
                }
        }
 
 
        /* 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;
 
 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