diff options
| author | Neil Conway <neilc@samurai.com> | 2007-04-26 16:13:15 +0000 |
|---|---|---|
| committer | Neil Conway <neilc@samurai.com> | 2007-04-26 16:13:15 +0000 |
| commit | 16efdb5ec7f28bed9541fc773330e3e2ebe2ed9a (patch) | |
| tree | 6ec0d0c7b08584ef53bf340e4d71a156e9655eba /src/bin | |
| parent | 5ea27a4b2812d148f2516d130aee9dbaba45cedc (diff) | |
| download | postgresql-16efdb5ec7f28bed9541fc773330e3e2ebe2ed9a.tar.gz | |
Rename the newly-added commands for discarding session state.
RESET SESSION, RESET PLANS, and RESET TEMP are now DISCARD ALL,
DISCARD PLANS, and DISCARD TEMP, respectively. This is to avoid
confusion with the pre-existing RESET variants: the DISCARD
commands are not actually similar to RESET. Patch from Marko
Kreen, with some minor editorialization.
Diffstat (limited to 'src/bin')
| -rw-r--r-- | src/bin/psql/tab-complete.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index 090030fd0c..2ec534cba4 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -3,7 +3,7 @@ * * Copyright (c) 2000-2007, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.161 2007/04/08 00:26:34 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.162 2007/04/26 16:13:13 neilc Exp $ */ /*---------------------------------------------------------------------- @@ -527,8 +527,8 @@ psql_completion(char *text, int start, int end) static const char *const sql_commands[] = { "ABORT", "ALTER", "ANALYZE", "BEGIN", "CHECKPOINT", "CLOSE", "CLUSTER", "COMMENT", "COMMIT", "COPY", "CREATE", "DEALLOCATE", "DECLARE", - "DELETE FROM", "DROP", "END", "EXECUTE", "EXPLAIN", "FETCH", "GRANT", - "INSERT", "LISTEN", "LOAD", "LOCK", "MOVE", "NOTIFY", "PREPARE", + "DELETE FROM", "DISCARD", "DROP", "END", "EXECUTE", "EXPLAIN", "FETCH", + "GRANT", "INSERT", "LISTEN", "LOAD", "LOCK", "MOVE", "NOTIFY", "PREPARE", "REASSIGN", "REINDEX", "RELEASE", "RESET", "REVOKE", "ROLLBACK", "SAVEPOINT", "SELECT", "SET", "SHOW", "START", "TRUNCATE", "UNLISTEN", "UPDATE", "VACUUM", NULL @@ -1244,6 +1244,15 @@ psql_completion(char *text, int start, int end) } /* XXX: implement tab completion for DELETE ... USING */ +/* DISCARD */ + else if (pg_strcasecmp(prev_wd, "DISCARD") == 0) + { + static const char *const list_DISCARD[] = + {"ALL", "PLANS", "TEMP", NULL}; + + COMPLETE_WITH_LIST(list_DISCARD); + } + /* DROP (when not the previous word) */ /* DROP AGGREGATE */ else if (pg_strcasecmp(prev3_wd, "DROP") == 0 && |
