From b67aaf21e8ef8273d5179a8832a109153d7adfe1 Mon Sep 17 00:00:00 2001 From: Andres Freund Date: Sat, 3 Oct 2015 18:19:37 +0200 Subject: 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 --- contrib/ltree_plpython/expected/ltree_plpython.out | 4 ++-- contrib/ltree_plpython/sql/ltree_plpython.sql | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'contrib/ltree_plpython') 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 -- cgit v1.2.3