aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/tablecmds.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2015-11-16 21:16:42 -0500
committerPeter Eisentraut <peter_e@gmx.net>2015-11-16 21:16:42 -0500
commit689cabf402c33a69e595a0d25f61b1fb49fb1c78 (patch)
tree519966d4b2c4fa4b9cc495a041f18ccf2f484f39 /src/backend/commands/tablecmds.c
parent75c8af902e07a2090df429f410df1e753e3358f1 (diff)
downloadpostgresql-689cabf402c33a69e595a0d25f61b1fb49fb1c78.tar.gz
postgresql-689cabf402c33a69e595a0d25f61b1fb49fb1c78.zip
Message improvements
Diffstat (limited to 'src/backend/commands/tablecmds.c')
-rw-r--r--src/backend/commands/tablecmds.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index cf99de4e8db..c5bfee68a5a 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -11195,10 +11195,8 @@ ATPrepChangePersistence(Relation rel, bool toLogged)
case RELPERSISTENCE_TEMP:
ereport(ERROR,
(errcode(ERRCODE_INVALID_TABLE_DEFINITION),
- errmsg("cannot change logged status of table %s",
+ errmsg("cannot change logged status of table \"%s\" because it is temporary",
RelationGetRelationName(rel)),
- errdetail("Table %s is temporary.",
- RelationGetRelationName(rel)),
errtable(rel)));
break;
case RELPERSISTENCE_PERMANENT:
@@ -11256,11 +11254,9 @@ ATPrepChangePersistence(Relation rel, bool toLogged)
if (foreignrel->rd_rel->relpersistence != RELPERSISTENCE_PERMANENT)
ereport(ERROR,
(errcode(ERRCODE_INVALID_TABLE_DEFINITION),
- errmsg("cannot change status of table %s to logged",
- RelationGetRelationName(rel)),
- errdetail("Table %s references unlogged table %s.",
- RelationGetRelationName(rel),
- RelationGetRelationName(foreignrel)),
+ errmsg("could not change table \"%s\" to logged because it references unlogged table \"%s\"",
+ RelationGetRelationName(rel),
+ RelationGetRelationName(foreignrel)),
errtableconstraint(rel, NameStr(con->conname))));
}
else
@@ -11268,11 +11264,9 @@ ATPrepChangePersistence(Relation rel, bool toLogged)
if (foreignrel->rd_rel->relpersistence == RELPERSISTENCE_PERMANENT)
ereport(ERROR,
(errcode(ERRCODE_INVALID_TABLE_DEFINITION),
- errmsg("cannot change status of table %s to unlogged",
- RelationGetRelationName(rel)),
- errdetail("Logged table %s is referenced by table %s.",
- RelationGetRelationName(foreignrel),
- RelationGetRelationName(rel)),
+ errmsg("could not change table \"%s\" to unlogged because it references logged table \"%s\"",
+ RelationGetRelationName(rel),
+ RelationGetRelationName(foreignrel)),
errtableconstraint(rel, NameStr(con->conname))));
}