Re: sql_drop Event Trigger - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: sql_drop Event Trigger
Date
Msg-id 20130306043916.GR9507@alvh.no-ip.org
Whole thread Raw
In response to Re: sql_drop Event Trigger  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: sql_drop Event Trigger  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
List pgsql-hackers
Alvaro Herrera escribió:

> Now, one last thing that comes up is what about objects that don't have
> straight names (such as pg_amop, pg_amproc, pg_default_acl etc etc), the
> only thing you get is a catalog OID and an object OID ... but they are
> pretty useless because by the time you get to the ddl_command_end
> trigger, the objects are gone from the catalog.  Maybe we should report
> *something* about those.

Here's another idea --- have three columns, "type", "schema" (as in the
current patch and as shown above), and a third one for object identity.

For tables and other objects that have simple names, the identity would
be their names.  For columns, it'd be <tablename>.<columnname>.  For
functions, it'd be the complete signature.  And so on.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: pg_ctl idempotent option
Next
From: Michael Paquier
Date:
Subject: Re: Writable foreign tables: how to identify rows