From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Add SQL-callable pg_get_object_address
Date: Tue, 23 Dec 2014 18:34:53 +0000
Message-ID: <E1Y3UIH-0002tu-LR@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Add SQL-callable pg_get_object_address
This allows access to get_object_address from SQL, which is useful to
obtain OID addressing information from data equivalent to that emitted
by the parser. This is necessary infrastructure of a project to let
replication systems propagate object dropping events to remote servers,
where the schema might be different than the server originating the
DROP.
This patch also adds support for OBJECT_DEFAULT to get_object_address;
that is, it is now possible to refer to a column's default value.
Catalog version bumped due to the new function.
Reviewed by Stephen Frost, Heikki Linnakangas, Robert Haas, Andres
Freund, Abhijit Menon-Sen, Adam Brightwell.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/d7ee82e50f624221db76023c17137661fe69ec61
Modified Files
--------------
src/backend/catalog/objectaddress.c | 440 ++++++++++++++++++++++++++
src/backend/commands/event_trigger.c | 1 +
src/backend/parser/parse_type.c | 46 ++-
src/include/catalog/catversion.h | 2 +-
src/include/catalog/objectaddress.h | 1 +
src/include/catalog/pg_proc.h | 3 +
src/include/nodes/parsenodes.h | 1 +
src/include/parser/parse_type.h | 1 +
src/include/utils/builtins.h | 3 +
src/test/regress/expected/object_address.out | 399 +++++++++++++++++++++++
src/test/regress/parallel_schedule | 2 +-
src/test/regress/serial_schedule | 1 +
src/test/regress/sql/object_address.sql | 177 +++++++++++
13 files changed, 1059 insertions(+), 18 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: Add SQL-callable pg_get_object_address
In-Reply-To: <E1Y3UIH-0002tu-LR@gemulon.postgresql.org>
References: <E1Y3UIH-0002tu-LR@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