diff options
author | Andres Freund | 2015-10-03 16:19:37 +0000 |
---|---|---|
committer | Andres Freund | 2015-10-03 16:23:40 +0000 |
commit | b67aaf21e8ef8273d5179a8832a109153d7adfe1 (patch) | |
tree | 4e3d4f851d5ac04aad1bce38a0e1a7d5e35b74bb /contrib/ltree_plpython | |
parent | bf686796a055a8bd4abc9765763eb675a0428473 (diff) |
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/ltree_plpython')
-rw-r--r-- | contrib/ltree_plpython/expected/ltree_plpython.out | 4 | ||||
-rw-r--r-- | contrib/ltree_plpython/sql/ltree_plpython.sql | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/contrib/ltree_plpython/expected/ltree_plpython.out b/contrib/ltree_plpython/expected/ltree_plpython.out index c6e8a7c087c..4779755fc80 100644 --- a/contrib/ltree_plpython/expected/ltree_plpython.out +++ b/contrib/ltree_plpython/expected/ltree_plpython.out @@ -1,5 +1,5 @@ -CREATE EXTENSION plpython2u; -CREATE EXTENSION ltree_plpython2u; +CREATE EXTENSION ltree_plpython2u CASCADE; +NOTICE: installing required extension "plpython2u" CREATE FUNCTION test1(val ltree) RETURNS int LANGUAGE plpythonu TRANSFORM FOR TYPE ltree diff --git a/contrib/ltree_plpython/sql/ltree_plpython.sql b/contrib/ltree_plpython/sql/ltree_plpython.sql index f08ff6a3f06..210f5428a5a 100644 --- a/contrib/ltree_plpython/sql/ltree_plpython.sql +++ b/contrib/ltree_plpython/sql/ltree_plpython.sql @@ -1,5 +1,4 @@ -CREATE EXTENSION plpython2u; -CREATE EXTENSION ltree_plpython2u; +CREATE EXTENSION ltree_plpython2u CASCADE; CREATE FUNCTION test1(val ltree) RETURNS int |