aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/alter.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2011-12-15 19:02:58 -0500
committerRobert Haas <rhaas@postgresql.org>2011-12-15 19:02:58 -0500
commit1da5c119594e4fb07fb6a2c57f66642fa5e966fb (patch)
tree23ac08f5143d59519a6da5c2c7f45897617fd681 /src/backend/commands/alter.c
parent74a1d4fe7cc092076806767925d6f34ea347efde (diff)
downloadpostgresql-1da5c119594e4fb07fb6a2c57f66642fa5e966fb.tar.gz
postgresql-1da5c119594e4fb07fb6a2c57f66642fa5e966fb.zip
Improve behavior of concurrent ALTER <relation> .. SET SCHEMA.
If the referrent of a name changes while we're waiting for the lock, we must recheck permissons. We also now check the relkind before locking, since it's easy to do that long the way. Patch by me; review by Noah Misch.
Diffstat (limited to 'src/backend/commands/alter.c')
-rw-r--r--src/backend/commands/alter.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/backend/commands/alter.c b/src/backend/commands/alter.c
index 2954bb27dd9..8513837fa10 100644
--- a/src/backend/commands/alter.c
+++ b/src/backend/commands/alter.c
@@ -191,7 +191,6 @@ ExecAlterObjectSchemaStmt(AlterObjectSchemaStmt *stmt)
case OBJECT_TABLE:
case OBJECT_VIEW:
case OBJECT_FOREIGN_TABLE:
- CheckRelationOwnership(stmt->relation, true);
AlterTableNamespace(stmt->relation, stmt->newschema,
stmt->objectType, AccessExclusiveLock);
break;