aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/trigger.c
diff options
context:
space:
mode:
authorNeil Conway <neilc@samurai.com>2005-03-24 00:03:26 +0000
committerNeil Conway <neilc@samurai.com>2005-03-24 00:03:26 +0000
commit50ce8ab9fcd49dfcbff9e19c5aa53efe0fc6dc6e (patch)
tree59e74d9c83918c0d3f49fce524d94c945751092f /src/backend/commands/trigger.c
parent8abba638599113e8c742c6f97a204c625db36b43 (diff)
downloadpostgresql-50ce8ab9fcd49dfcbff9e19c5aa53efe0fc6dc6e.tar.gz
postgresql-50ce8ab9fcd49dfcbff9e19c5aa53efe0fc6dc6e.zip
Revert changes to CREATE TRIGGER and ALTER TABLE ADD FOREIGN KEY locking,
per request from Tom.
Diffstat (limited to 'src/backend/commands/trigger.c')
-rw-r--r--src/backend/commands/trigger.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index 55333e1f4f1..54e0eac2688 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/commands/trigger.c,v 1.179 2005/03/23 07:44:57 neilc Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/trigger.c,v 1.180 2005/03/24 00:03:26 neilc Exp $
*
*-------------------------------------------------------------------------
*/
@@ -87,14 +87,7 @@ CreateTrigger(CreateTrigStmt *stmt, bool forConstraint)
ObjectAddress myself,
referenced;
- /*
- * We need to prevent concurrent CREATE TRIGGER commands, as well
- * as concurrent table modifications (INSERT, DELETE, UPDATE), so
- * acquire an ExclusiveLock -- it should be fine to allow SELECTs
- * to proceed. We could perhaps acquire ShareRowExclusiveLock, but
- * there seems little gain in allowing SELECT FOR UPDATE.
- */
- rel = heap_openrv(stmt->relation, ExclusiveLock);
+ rel = heap_openrv(stmt->relation, AccessExclusiveLock);
if (stmt->constrrel != NULL)
constrrelid = RangeVarGetRelid(stmt->constrrel, false);