aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/tablespace.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands/tablespace.c')
-rw-r--r--src/backend/commands/tablespace.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/backend/commands/tablespace.c b/src/backend/commands/tablespace.c
index 69ea155d502..0385fd61214 100644
--- a/src/backend/commands/tablespace.c
+++ b/src/backend/commands/tablespace.c
@@ -449,7 +449,6 @@ DropTableSpace(DropTableSpaceStmt *stmt)
ereport(NOTICE,
(errmsg("tablespace \"%s\" does not exist, skipping",
tablespacename)));
- /* XXX I assume I need one or both of these next two calls */
table_endscan(scandesc);
table_close(rel, NoLock);
}
@@ -465,8 +464,7 @@ DropTableSpace(DropTableSpaceStmt *stmt)
tablespacename);
/* Disallow drop of the standard tablespaces, even by superuser */
- if (tablespaceoid == GLOBALTABLESPACE_OID ||
- tablespaceoid == DEFAULTTABLESPACE_OID)
+ if (IsPinnedObject(TableSpaceRelationId, tablespaceoid))
aclcheck_error(ACLCHECK_NO_PRIV, OBJECT_TABLESPACE,
tablespacename);