From: | Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
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-03-02 14:34:00 |
Message-ID: | m2ppzhrhuv.fsf@2ndQuadrant.fr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
> Dimitri Fontaine escribió:
>
>> The good news is that the patch to do that has already been sent on this
>> list, and got reviewed in details by Álvaro who did offer incremental
>> changes. Version 3 of that patch is to be found in:
>>
>> http://www.postgresql.org/message-id/m2fw19n1hr.fsf@2ndQuadrant.fr
>
> Here's a v4 of that patch. I added support for DROP OWNED, and added
> object name and schema name available to the pg_dropped_objects
> function.
Thanks!
> Do we want some more stuff provided by pg_dropped_objects? We now have
> classId, objectId, objectSubId, object name, schema name. One further
> thing I think we need is the object's type, i.e. a simple untranslated
> string "table", "view", "operator" and so on. AFAICT this requires a
> nearly-duplicate of getObjectDescription.
About what missing information to add, please review:
http://wiki.postgresql.org/wiki/Event_Triggers#How_to_expose_Information_to_Event_Triggers_Functions
I'd like us to provide the same set of extra information from within
classic Event Triggers and in the records returned by the function.
Maybe a good idea would be to create a datatype for that, and publish a
single TG_DETAILS variable from within Event Triggers, of that type, and
have the pg_dropped_objects() function return a setof that type?
About the implementation and the getObjectDescription() remark, please
have a look at your latest revision of the other patch in the series,
http://www.postgresql.org/message-id/20130109165829.GB4490@alvh.no-ip.org
I think it provides exactly what you need here, and you already did
cleanup my work for getting at that…
Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Stark | 2013-03-02 14:36:28 | Re: Materialized views WIP patch |
Previous Message | Craig Ringer | 2013-03-02 06:29:18 | Re: Commitfest progress |