diff options
Diffstat (limited to 'src/backend/commands/rename.c')
-rw-r--r-- | src/backend/commands/rename.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/backend/commands/rename.c b/src/backend/commands/rename.c index 019f7d169d..6061396e0c 100644 --- a/src/backend/commands/rename.c +++ b/src/backend/commands/rename.c @@ -92,7 +92,7 @@ renameatt(Oid relid, * normally, only the owner of a class can change its schema. */ if (!allowSystemTableMods - && IsSystemRelationName(RelationGetRelationName(targetrelation))) + && IsSystemRelation(targetrelation)) elog(ERROR, "renameatt: class \"%s\" is a system catalog", RelationGetRelationName(targetrelation)); if (!pg_class_ownercheck(relid, GetUserId())) @@ -276,14 +276,10 @@ renamerel(Oid relid, const char *newrelname) /* Validity checks */ if (!allowSystemTableMods && - IsSystemRelationName(RelationGetRelationName(targetrelation))) + IsSystemRelation(targetrelation)) elog(ERROR, "renamerel: system relation \"%s\" may not be renamed", RelationGetRelationName(targetrelation)); - if (!allowSystemTableMods && IsSystemRelationName(newrelname)) - elog(ERROR, "renamerel: Illegal class name: \"%s\" -- pg_ is reserved for system catalogs", - newrelname); - relkind = targetrelation->rd_rel->relkind; relhastriggers = (targetrelation->rd_rel->reltriggers > 0); |