Skip site navigation (1) Skip section navigation (2)

Re: sql_drop Event Triggerg

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>,Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>,PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: sql_drop Event Triggerg
Date: 2013-03-28 16:13:40
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Pushed, with some further minor changes.  One not-so-minor change I
introduced was that pg_event_trigger_dropped_objects() now only works
within a sql_drop event function.  The reason I decided to do this was
that if we don't have that protection, then it is possible to have a
ddl_command_end trigger calling pg_event_trigger_dropped_objects(); and
if there is an sql_drop trigger, then it'd return the list of dropped
objects, but if there's no sql_drop trigger, it'd raise an error.  That
seemed surprising enough action-at-a-distance that some protection is

Thanks for all the review.

Álvaro Herrera      
PostgreSQL Development, 24x7 Support, Training & Services

In response to


pgsql-hackers by date

Next:From: Stephen FrostDate: 2013-03-28 16:20:44
Subject: Re: FDW for PostgreSQL
Previous:From: Alvaro HerreraDate: 2013-03-28 16:08:30
Subject: pgsql: Add sql_drop event for event triggers

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group