Re: sql_drop Event Trigger
Alvaro Herrera <alvherre@2ndquadrant.com>
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Dimitri Fontaine <dimitri@2ndQuadrant.fr>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Robert Haas <robertmhaas@gmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2013-02-06T16:20:15Z
Lists: 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