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 --- src/backend/parser/gram.y | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/backend/parser') diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index fb84937b626..417fb55bc48 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -3876,6 +3876,10 @@ create_extension_opt_item: { $$ = makeDefElem("old_version", (Node *)makeString($2)); } + | CASCADE + { + $$ = makeDefElem("cascade", (Node *)makeInteger(TRUE)); + } ; /***************************************************************************** -- cgit v1.2.3