mirror of
https://github.com/postgres/postgres.git
synced 2025-07-12 21:01:52 +03:00
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
This commit is contained in:
@ -2264,7 +2264,12 @@ psql_completion(const char *text, int start, int end)
|
||||
/* CREATE EXTENSION <name> */
|
||||
else if (pg_strcasecmp(prev3_wd, "CREATE") == 0 &&
|
||||
pg_strcasecmp(prev2_wd, "EXTENSION") == 0)
|
||||
COMPLETE_WITH_CONST("WITH SCHEMA");
|
||||
{
|
||||
static const char *const list_CREATE_EXTENSION[] =
|
||||
{"WITH SCHEMA", "CASCADE", NULL};
|
||||
|
||||
COMPLETE_WITH_LIST(list_CREATE_EXTENSION);
|
||||
}
|
||||
|
||||
/* CREATE FOREIGN */
|
||||
else if (pg_strcasecmp(prev2_wd, "CREATE") == 0 &&
|
||||
|
Reference in New Issue
Block a user