aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands')
-rw-r--r--src/backend/commands/copy.c2
-rw-r--r--src/backend/commands/extension.c2
-rw-r--r--src/backend/commands/tablecmds.c20
-rw-r--r--src/backend/commands/tablespace.c4
4 files changed, 11 insertions, 17 deletions
diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c
index 9f1f225aad7..586d229584a 100644
--- a/src/backend/commands/copy.c
+++ b/src/backend/commands/copy.c
@@ -877,7 +877,7 @@ DoCopy(const CopyStmt *stmt, const char *queryString, uint64 *processed)
if (is_from)
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("COPY FROM not supported with row level security."),
+ errmsg("COPY FROM not supported with row-level security."),
errhint("Use INSERT statements instead.")));
/* Build target list */
diff --git a/src/backend/commands/extension.c b/src/backend/commands/extension.c
index 2b1dcd0d19c..f69a19846fb 100644
--- a/src/backend/commands/extension.c
+++ b/src/backend/commands/extension.c
@@ -3028,7 +3028,7 @@ read_whole_file(const char *filename, int *length)
if (fst.st_size > (MaxAllocSize - 1))
ereport(ERROR,
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
- errmsg("file too large")));
+ errmsg("file \"%s\" is too large", filename)));
bytes_to_read = (size_t) fst.st_size;
if ((file = AllocateFile(filename, PG_BINARY_R)) == NULL)
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))));
}
diff --git a/src/backend/commands/tablespace.c b/src/backend/commands/tablespace.c
index 18ae4ab10af..137aec255f4 100644
--- a/src/backend/commands/tablespace.c
+++ b/src/backend/commands/tablespace.c
@@ -800,7 +800,7 @@ remove_symlink:
/* Refuse to remove anything that's not a directory or symlink */
ereport(redo ? LOG : ERROR,
(ERRCODE_SYSTEM_ERROR,
- errmsg("not a directory or symbolic link: \"%s\"",
+ errmsg("\"%s\" is not a directory or symbolic link",
linkloc)));
}
@@ -886,7 +886,7 @@ remove_tablespace_symlink(const char *linkloc)
{
/* Refuse to remove anything that's not a directory or symlink */
ereport(ERROR,
- (errmsg("not a directory or symbolic link: \"%s\"",
+ (errmsg("\"%s\" is not a directory or symbolic link",
linkloc)));
}
}