summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut2017-03-01 13:51:57 +0000
committerPeter Eisentraut2017-03-01 13:51:57 +0000
commitb5a388392dab4c4a7c0fbd6cd0ad7421eabfc5cf (patch)
treed8aeea7f68156e423440bc6f696b56551f87720b /src
parent21a3cf41284c08307ef9abe3400be5dc53723519 (diff)
psql: Add tab completion for DEALLOCATE
EXECUTE already tab-completes the list of prepared statements, but DEALLOCATE was missing. From: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Diffstat (limited to 'src')
-rw-r--r--src/bin/psql/tab-complete.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
index ddad71a10f6..38a3fd27c46 100644
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -2509,6 +2509,10 @@ psql_completion(const char *text, int start, int end)
else if (Matches5("CREATE", "EVENT", "TRIGGER", MatchAny, "ON"))
COMPLETE_WITH_LIST3("ddl_command_start", "ddl_command_end", "sql_drop");
+/* DEALLOCATE */
+ else if (Matches1("DEALLOCATE"))
+ COMPLETE_WITH_QUERY(Query_for_list_of_prepared_statements);
+
/* DECLARE */
else if (Matches2("DECLARE", MatchAny))
COMPLETE_WITH_LIST5("BINARY", "INSENSITIVE", "SCROLL", "NO SCROLL",