Re: sql_drop Event Trigger - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: sql_drop Event Trigger
Date
Msg-id 20130206162014.GG4299@alvh.no-ip.org
Whole thread Raw
In response to Re: sql_drop Event Trigger  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Responses Re: sql_drop Event Trigger  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
List pgsql-hackers
Dimitri Fontaine escribió:
> Tom Lane <tgl@sss.pgh.pa.us> writes:
> > I might be forgetting something, but doesn't dependency.c work by first
> > constructing a list of all the objects it's going to drop, and only then
> > dropping them?  Could we inject a "pre deletion" event trigger call at
> > the point where the list is completed?

Yes, this is what I'm proposing.

> What happens if the event trigger itself deletes objects? From the list?

I replied to this above: raise an error.  (How to do that is an open
implementation question, but I proposed a simple idea upthread).

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: palloc unification
Next
From: Tom Lane
Date:
Subject: Re: get_progname() should not be const char *?