Add CASCADE support for CREATE EXTENSION.

Without CASCADE, if an extension has an unfullfilled dependency on
another extension, CREATE EXTENSION ERRORs out with "required extension
... is not installed". That is annoying, especially when that dependency
is an implementation detail of the extension, rather than something the
extension's user can make sense of.

In addition to CASCADE this also includes a small set of regression
tests around CREATE EXTENSION.

Author: Petr Jelinek, editorialized by Michael Paquier, Andres Freund
Reviewed-By: Michael Paquier, Andres Freund, Jeff Janes
Discussion: [email protected]

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/b67aaf21e8ef8273d5179a8832a109153d7adfe1

Modified Files
--------------
contrib/hstore_plperl/expected/hstore_plperl.out   |    6 +-
contrib/hstore_plperl/expected/hstore_plperlu.out  |    6 +-
contrib/hstore_plperl/sql/hstore_plperl.sql        |    4 +-
contrib/hstore_plperl/sql/hstore_plperlu.sql       |    4 +-
.../hstore_plpython/expected/hstore_plpython.out   |    4 +-
contrib/hstore_plpython/sql/hstore_plpython.sql    |    3 +-
contrib/ltree_plpython/expected/ltree_plpython.out |    4 +-
contrib/ltree_plpython/sql/ltree_plpython.sql      |    3 +-
doc/src/sgml/ref/create_extension.sgml             |   42 ++++
src/backend/commands/extension.c                   |  217 ++++++++++++++------
src/backend/parser/gram.y                          |    4 +
src/bin/psql/tab-complete.c                        |    7 +-
src/test/modules/Makefile                          |    1 +
src/test/modules/test_extensions/.gitignore        |    4 +
src/test/modules/test_extensions/Makefile          |   23 +++
.../test_extensions/expected/test_extensions.out   |   37 ++++
.../test_extensions/sql/test_extensions.sql        |   15 ++
.../modules/test_extensions/test_ext1--1.0.sql     |    3 +
src/test/modules/test_extensions/test_ext1.control |    5 +
.../modules/test_extensions/test_ext2--1.0.sql     |    3 +
src/test/modules/test_extensions/test_ext2.control |    4 +
.../modules/test_extensions/test_ext3--1.0.sql     |    3 +
src/test/modules/test_extensions/test_ext3.control |    3 +
.../modules/test_extensions/test_ext4--1.0.sql     |    3 +
src/test/modules/test_extensions/test_ext4.control |    4 +
.../modules/test_extensions/test_ext5--1.0.sql     |    3 +
src/test/modules/test_extensions/test_ext5.control |    3 +
.../test_extensions/test_ext_cyclic1--1.0.sql      |    3 +
.../test_extensions/test_ext_cyclic1.control       |    4 +
.../test_extensions/test_ext_cyclic2--1.0.sql      |    3 +
.../test_extensions/test_ext_cyclic2.control       |    4 +
src/tools/msvc/Mkvcbuild.pm                        |    3 +-
32 files changed, 346 insertions(+), 89 deletions(-)


-- 
Sent via pgsql-committers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

Reply via email to