Skip to content

Commit 750903e

Browse files
author
Antonin Houska
committed
Added more user-friendly error message.
1 parent 8ce9ae5 commit 750903e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

pg_squeeze.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -928,6 +928,18 @@ check_prerequisites(Relation rel)
928928
errmsg("\"%s\" is shared relation",
929929
RelationGetRelationName(rel))));
930930

931+
if (IsCatalogRelation(rel))
932+
ereport(ERROR,
933+
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
934+
errmsg("\"%s\" is a catalog relation",
935+
RelationGetRelationName(rel))));
936+
937+
/*
938+
* We cannot simply replace the storage of a mapped relation.
939+
*
940+
* The previous check should have caught them, but let's try hard to be
941+
* safe.
942+
*/
931943
if (RelationIsMapped(rel))
932944
ereport(ERROR,
933945
(errcode(ERRCODE_WRONG_OBJECT_TYPE),

0 commit comments

Comments
 (0)