Re: sql_drop Event Trigger

From: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: sql_drop Event Trigger
Date: 2013-02-05 21:57:00
Message-ID: m2fw1ao24z.fsf@2ndQuadrant.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

And already a v1.

Álvaro did spot a line I did remove by mistake in the docs, and some
extra whitespace changes that pgindent will change anyway and that as
such I shouldn't force you to read and discard.

It's a 3 lines change set from before.

Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr> writes:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> Well, having spent a year or more trying to convince you that we need
>> sql_drop - mostly because of the complexities of passing an array of
>> arguments to the trigger function - I now think we don't, because the
>> pg_event_trigger_dropped_objects() bit solves that problem rather
>> elegantly. It seems to me with just a little bit of hacking we should
>> be able to make this work by adding that function and changing nothing
>> else. I might be wrong, of course.
>
> It's not exactly like we don't need to add anything else than just the
> function to support the feature, but it's not that much either. Please
> see attached.
>
> doc/src/sgml/event-trigger.sgml | 15 +-
> doc/src/sgml/func.sgml | 48 ++++++-
> src/backend/access/transam/xact.c | 8 +-
> src/backend/catalog/dependency.c | 38 +----
> src/backend/commands/event_trigger.c | 123 ++++++++++++++++-
> src/backend/tcop/utility.c | 28 +++-
> src/include/catalog/dependency.h | 31 ++++-
> src/include/catalog/pg_proc.h | 4 +-
> src/include/commands/event_trigger.h | 21 +++
> src/include/utils/builtins.h | 3 +
> src/test/regress/expected/event_trigger.out | 67 ++++++++-
> src/test/regress/sql/event_trigger.sql | 39 +++++-
> 12 files changed, 374 insertions(+), 51 deletions(-)
>
> Regards,
> --
> Dimitri Fontaine
> http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support

--
Dimitri Fontaine
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support

Attachment Content-Type Size
dropped_objects.1.patch.gz application/octet-stream 6.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2013-02-05 22:31:21 Re: PATCH: Split stats file per database WAS: autovacuum stress-testing our system
Previous Message Dimitri Fontaine 2013-02-05 21:35:54 Re: sql_drop Event Trigger