projects
/
users
/
andresfreund
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
21a3cf4
)
psql: Add tab completion for DEALLOCATE
author
Peter Eisentraut
<
[email protected]
>
Wed, 1 Mar 2017 13:51:57 +0000
(08:51 -0500)
committer
Peter Eisentraut
<
[email protected]
>
Wed, 1 Mar 2017 13:51:57 +0000
(08:51 -0500)
EXECUTE already tab-completes the list of prepared statements, but
DEALLOCATE was missing.
From: Dagfinn Ilmari Mannsåker <
[email protected]
>
src/bin/psql/tab-complete.c
patch
|
blob
|
blame
|
history
diff --git
a/src/bin/psql/tab-complete.c
b/src/bin/psql/tab-complete.c
index ddad71a10f628950f515b4845c0ca86e01b18fc2..38a3fd27c46f0c9c2697cce58ce2eb30acd5afe2 100644
(file)
--- 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",