From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Return ObjectAddress in many ALTER TABLE sub-routines
Date: Wed, 25 Mar 2015 20:22:16 +0000
Message-ID: <E1Yaroe-0006Kr-Sh@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Return ObjectAddress in many ALTER TABLE sub-routines
Since commit a2e35b53c39b2a, most CREATE and ALTER commands return the
ObjectAddress of the affected object. This is useful for event triggers
to try to figure out exactly what happened. This patch extends this
idea a bit further to cover ALTER TABLE as well: an auxiliary
ObjectAddress is returned for each of several subcommands of ALTER
TABLE. This makes it possible to decode with precision what happened
during execution of any ALTER TABLE command; for instance, which
constraint was added by ALTER TABLE ADD CONSTRAINT, or which parent got
dropped from the parents list by ALTER TABLE NO INHERIT.
As with the previous patch, there is no immediate user-visible change
here.
This is all really just continuing what c504513f83a9ee8 started.
Reviewed by Stephen Frost.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/bdc3d7fa2376a7a1e977383cc3221cfe44c4a893
Modified Files
--------------
src/backend/catalog/heap.c | 98 ++++----
src/backend/catalog/index.c | 9 +-
src/backend/catalog/pg_constraint.c | 2 +
src/backend/commands/tablecmds.c | 419 ++++++++++++++++++++++++++---------
src/include/catalog/heap.h | 3 +-
src/include/catalog/index.h | 3 +-
6 files changed, 380 insertions(+), 154 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: alvherre@alvh.no-ip.org
Subject: Re: pgsql: Return ObjectAddress in many ALTER TABLE sub-routines
In-Reply-To: <E1Yaroe-0006Kr-Sh@gemulon.postgresql.org>
References: <E1Yaroe-0006Kr-Sh@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox