diff options
author | Andres Freund <andres@anarazel.de> | 2015-10-03 18:19:37 +0200 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2015-10-03 18:23:40 +0200 |
commit | b67aaf21e8ef8273d5179a8832a109153d7adfe1 (patch) | |
tree | 4e3d4f851d5ac04aad1bce38a0e1a7d5e35b74bb /contrib/hstore_plpython | |
parent | bf686796a055a8bd4abc9765763eb675a0428473 (diff) | |
download | postgresql-b67aaf21e8ef8273d5179a8832a109153d7adfe1.tar.gz postgresql-b67aaf21e8ef8273d5179a8832a109153d7adfe1.zip |
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: 557E0520.3040800@2ndquadrant.com
Diffstat (limited to 'contrib/hstore_plpython')
-rw-r--r-- | contrib/hstore_plpython/expected/hstore_plpython.out | 4 | ||||
-rw-r--r-- | contrib/hstore_plpython/sql/hstore_plpython.sql | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/contrib/hstore_plpython/expected/hstore_plpython.out b/contrib/hstore_plpython/expected/hstore_plpython.out index 23091d3729c..b0025c04a81 100644 --- a/contrib/hstore_plpython/expected/hstore_plpython.out +++ b/contrib/hstore_plpython/expected/hstore_plpython.out @@ -1,5 +1,5 @@ -CREATE EXTENSION plpython2u; -CREATE EXTENSION hstore_plpython2u; +CREATE EXTENSION hstore_plpython2u CASCADE; +NOTICE: installing required extension "plpython2u" -- test hstore -> python CREATE FUNCTION test1(val hstore) RETURNS int LANGUAGE plpythonu diff --git a/contrib/hstore_plpython/sql/hstore_plpython.sql b/contrib/hstore_plpython/sql/hstore_plpython.sql index 9ff2ebcd833..d55bedaf505 100644 --- a/contrib/hstore_plpython/sql/hstore_plpython.sql +++ b/contrib/hstore_plpython/sql/hstore_plpython.sql @@ -1,5 +1,4 @@ -CREATE EXTENSION plpython2u; -CREATE EXTENSION hstore_plpython2u; +CREATE EXTENSION hstore_plpython2u CASCADE; -- test hstore -> python |