From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Support ALTER THING .. DEPENDS ON EXTENSION
Date: Tue, 05 Apr 2016 21:43:39 +0000
Message-ID: <E1anYl9-0006P7-Gp@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Support ALTER THING .. DEPENDS ON EXTENSION
This introduces a new dependency type which marks an object as depending
on an extension, such that if the extension is dropped, the object
automatically goes away; and also, if the database is dumped, the object
is included in the dump output. Currently the grammar supports this for
indexes, triggers, materialized views and functions only, although the
utility code is generic so adding support for more object types is a
matter of touching the parser rules only.
Author: Abhijit Menon-Sen
Reviewed-by: Alexander Korotkov, Álvaro Herrera
Discussion: http://www.postgresql.org/message-id/20160115062649.GA5068@toroid.org
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/f2fcad27d59c8e5c48f8fa0a96c8355e40f24273
Modified Files
--------------
doc/src/sgml/catalogs.sgml | 13 ++
doc/src/sgml/ref/alter_function.sgml | 20 +++
doc/src/sgml/ref/alter_index.sgml | 20 +++
doc/src/sgml/ref/alter_materialized_view.sgml | 17 +++
doc/src/sgml/ref/alter_trigger.sgml | 20 ++-
src/backend/catalog/dependency.c | 2 +
src/backend/catalog/objectaddress.c | 25 ++++
src/backend/commands/alter.c | 37 +++++
src/backend/nodes/copyfuncs.c | 17 +++
src/backend/nodes/equalfuncs.c | 15 ++
src/backend/parser/gram.y | 56 +++++++-
src/backend/tcop/utility.c | 28 ++++
src/include/catalog/catversion.h | 2 +-
src/include/catalog/dependency.h | 7 +
src/include/catalog/objectaddress.h | 4 +
src/include/commands/alter.h | 2 +
src/include/nodes/nodes.h | 1 +
src/include/nodes/parsenodes.h | 14 ++
src/include/parser/kwlist.h | 1 +
src/test/modules/test_extensions/Makefile | 2 +-
.../test_extensions/expected/test_extdepend.out | 152 +++++++++++++++++++++
.../modules/test_extensions/sql/test_extdepend.sql | 73 ++++++++++
src/tools/pgindent/typedefs.list | 1 +
23 files changed, 524 insertions(+), 5 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: Support ALTER THING .. DEPENDS ON EXTENSION
In-Reply-To: <E1anYl9-0006P7-Gp@gemulon.postgresql.org>
References: <E1anYl9-0006P7-Gp@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