Re: FOREIGN KEY and AccessExclusiveLock - Mailing list pgsql-sql

From Achilleus Mantzios
Subject Re: FOREIGN KEY and AccessExclusiveLock
Date
Msg-id Pine.LNX.4.44.0409291611520.704-100000@matrix.gatewaynet.com
Whole thread Raw
In response to FOREIGN KEY and AccessExclusiveLock  (Achilleus Mantzios <achill@matrix.gatewaynet.com>)
Responses Re: FOREIGN KEY and AccessExclusiveLock  (Achilleus Mantzios <achill@matrix.gatewaynet.com>)
List pgsql-sql
Hmm, (something went wrong with some mailer)

Tom Lane wrote:
> We're adding a trigger to it.

From the docs:
============================================================================
ACCESS EXCLUSIVE
Conflicts with locks of all modes (ACCESS SHARE, ROW SHARE, ROW 
EXCLUSIVE, SHARE UPDATE EXCLUSIVE, SHARE, SHARE ROW EXCLUSIVE, EXCLUSIVE, 
and ACCESS EXCLUSIVE). This mode guarantees that the holder is the only 
transaction accessing the table in any way. 


Acquired by the ALTER TABLE, DROP TABLE, REINDEX, CLUSTER, and VACUUM FULL 
commands. This is also the default lock mode for LOCK TABLE statements 
that do not specify a mode explicitly. 


Tip: Only an ACCESS EXCLUSIVE lock blocks a SELECT (without FOR UPDATE) 
statement. 
============================================================================

Now, is the lock acquired for the CREATE TRIGGER an explicit
LOCK TABLE?
Because nothing is mentioned about triggers in 
http://www.postgresql.org/docs/7.4/interactive/explicit-locking.html
-- 
-Achilleus



pgsql-sql by date:

Previous
From: Paulo Nievierowski
Date:
Subject: SELECT with Function
Next
From: van Elsacker Frans
Date:
Subject: multiple insert