Subject: [PATCH] Add tab completion for DEALLOCATE

From: Dagfinn Ilmari Mannsåker <[email-masked]>
Date: Wed, 1 Feb 2017 17:39:43 +0000

EXECUTE already tab-completes the list of prepared statements, but
DEALLOCATE did not.
---
 src/bin/psql/tab-complete.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
index d6fffcf42f..4a7bfe844a 100644
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -2575,8 +2575,8 @@ psql_completion(const char *text, int start, int end)
 	else if (Matches5("DROP", "RULE", MatchAny, "ON", MatchAny))
 		COMPLETE_WITH_LIST2("CASCADE", "RESTRICT");
 
-/* EXECUTE */
-	else if (Matches1("EXECUTE"))
+/* EXECUTE && DEALLOCATE */
+	else if (Matches1("EXECUTE|DEALLOCATE"))
 		COMPLETE_WITH_QUERY(Query_for_list_of_prepared_statements);
 
 /* EXPLAIN */
-- 
2.11.0

--=-=-=
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0

-- 
Sent via pgsql-hackers mailing list ([email-masked])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

--=-=-=--