Re: [HACKERS] Adding the optional clause 'AS' in CREATE TRIGGER - Mailing list pgsql-hackers

From Okano, Naoki
Subject Re: [HACKERS] Adding the optional clause 'AS' in CREATE TRIGGER
Date
Msg-id 0B4917A40C80E34BBEC4BE1A7A9AB7E27ACAB4@g01jpexmbkw05
Whole thread Raw
In response to Re: [HACKERS] Adding the optional clause 'AS' in CREATE TRIGGER  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: [HACKERS] Adding the optional clause 'AS' in CREATE TRIGGER
List pgsql-hackers
Peter Eisentraut wrote:
> I have a feeling that this was proposed a few times in the ancient past
> but did not go through because of locking issues.  I can't find any
> emails about it through.  Does anyone remember?  Have you thought about
> locking issues?
Is this e-mail you are finding?
https://www.postgresql.org/message-id/20140916124537.GH25887%40awork2.anarazel.de

I am considering to add 'OR REPLACE' clause as a first step.
At least, I think there is no need to change the locking level when replacing a trigger with 'EXECUTE PROCEDURE'
clause.
In PostgreSQL, we currently have ShareRowExclusiveLock lock on relation on which trigger is created.
ShareRowExclusiveLockis enough to replace a trigger.
 
Also, we currently have RowExclusiveLock on pg_trigger. RowExclusiveLock is enough to replace a trigger, too.

Regards,
Okano Naoki
Fujitsu



pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: [HACKERS] PATCH: psql show index with type info
Next
From: Ashutosh Bapat
Date:
Subject: Re: [HACKERS] dropping partitioned tables without CASCADE