diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2015-11-16 21:16:42 -0500 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2015-11-16 21:39:23 -0500 |
commit | 5db837d3f22960c2fdc11b390ecf3984b3e0c49e (patch) | |
tree | fde75b3dbb7825e696d66c708e490850ed1b4446 /src/backend/commands/tablecmds.c | |
parent | 53264c7b1e0c9be7bc05289372265c768869f818 (diff) |
Message improvements
Diffstat (limited to 'src/backend/commands/tablecmds.c')
-rw-r--r-- | src/backend/commands/tablecmds.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 55ab2096cc3..44ea7311639 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -11213,10 +11213,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: @@ -11274,11 +11272,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 @@ -11286,11 +11282,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)))); } |