mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
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.
This commit is contained in:
@@ -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 &&
|
||||
|
Reference in New Issue
Block a user