diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2011-02-10 17:36:44 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2011-02-10 17:37:22 -0500 |
commit | 01467d3e4f51fe304c0160c9895484ad696d1e87 (patch) | |
tree | 6ce04b83da1f5c472281b3970eab67e2b8fc0d6a /src/bin/psql/tab-complete.c | |
parent | 289d7306555b2446d145c7e098c91b6ca20bd54c (diff) |
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.
Diffstat (limited to 'src/bin/psql/tab-complete.c')
-rw-r--r-- | src/bin/psql/tab-complete.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index 1c9623de1e5..c01b02ae3a1 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -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 && |