Re: sql_drop Event Trigger

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: sql_drop Event Trigger
Date: 2013-02-06 16:20:15
Message-ID: 20130206162014.GG4299@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dimitri Fontaine escribió:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-02-06 16:22:41 Re: get_progname() should not be const char *?
Previous Message Tom Lane 2013-02-06 16:17:30 Re: palloc unification