1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +03:00

Extend "ALTER EXTENSION ADD object" to permit "DROP object" as well.

Per discussion, this is something we should have sooner rather than later,
and it doesn't take much additional code to support it.
This commit is contained in:
Tom Lane
2011-02-10 17:36:44 -05:00
parent 289d730655
commit 01467d3e4f
12 changed files with 207 additions and 112 deletions

View File

@ -855,7 +855,12 @@ psql_completion(char *text, int start, int end)
/* ALTER EXTENSION <name> */
else if (pg_strcasecmp(prev3_wd, "ALTER") == 0 &&
pg_strcasecmp(prev2_wd, "EXTENSION") == 0)
COMPLETE_WITH_CONST("SET SCHEMA");
{
static const char *const list_ALTEREXTENSION[] =
{"ADD", "DROP", "SET SCHEMA", NULL};
COMPLETE_WITH_LIST(list_ALTEREXTENSION);
}
/* ALTER FOREIGN */
else if (pg_strcasecmp(prev2_wd, "ALTER") == 0 &&