Re: sql_drop Event Trigger - Mailing list pgsql-hackers

From Robert Haas
Subject Re: sql_drop Event Trigger
Date
Msg-id CA+TgmoafpQ3kHiv_02UD20cOyJnSJGPVUs1VwTwM6aK8h9uWQQ@mail.gmail.com
Whole thread Raw
In response to Re: sql_drop Event Trigger  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
On Thu, Feb 21, 2013 at 12:47 PM, Alvaro Herrera
<alvherre@2ndquadrant.com> wrote:
> You're misunderstanding.  If you do DROP EVENT TRIGGER, the DDL_DROP
> event won't fire at all.  So no matter how messed up your system is, you
> can always fix it by simply dropping the event trigger.
>
> What I was saying is that if you have some command other than DROP EVENT
> TRIGGER, which happens to drop an event trigger, said event trigger will
> not be present in the pg_dropped_objects results.

Hmm.  But, that means that if some other object manages to depend on
an event trigger, and you drop the event trigger with CASCADE taking
the other object with it, then some other event trigger being used
for, say, replication might fail to see the drop.  Right now that's
not possible but it seems potentially fragile.  Not that I have a
great idea.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: pg_xlogdump
Next
From: Robert Haas
Date:
Subject: Re: sql_drop Event Trigger