Re: sql_drop Event Trigger

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: sql_drop Event Trigger
Date: 2013-02-22 22:05:33
Message-ID: CA+TgmoafpQ3kHiv_02UD20cOyJnSJGPVUs1VwTwM6aK8h9uWQQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Feb 21, 2013 at 12:47 PM, Alvaro Herrera
<alvherre(at)2ndquadrant(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2013-02-22 22:07:07 Re: sql_drop Event Trigger
Previous Message Andres Freund 2013-02-22 20:02:25 Re: pg_xlogdump