Thread: [PATCH] Add tab completion for EXECUTE after EXPLAIN
[PATCH] Add tab completion for EXECUTE after EXPLAIN
From
ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)
Date:
Hi hackers, Here's a patch adding EXECUTE to the list of of commands tab completed after the various EXPLAIN variants. - ilmari From a303b7b44442e505d4cdd65a0bd1fdc031488a14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= <ilmari@ilmari.org> Date: Wed, 4 Aug 2021 12:07:24 +0100 Subject: [PATCH] Tab complete EXECUTE after EXPLAIN --- src/bin/psql/tab-complete.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index 064892bade..5d7feece59 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -3222,7 +3222,7 @@ psql_completion(const char *text, int start, int end) */ else if (Matches("EXPLAIN")) COMPLETE_WITH("SELECT", "INSERT INTO", "DELETE FROM", "UPDATE", "DECLARE", - "ANALYZE", "VERBOSE"); + "EXECUTE", "ANALYZE", "VERBOSE"); else if (HeadMatches("EXPLAIN", "(*") && !HeadMatches("EXPLAIN", "(*)")) { @@ -3241,11 +3241,12 @@ psql_completion(const char *text, int start, int end) } else if (Matches("EXPLAIN", "ANALYZE")) COMPLETE_WITH("SELECT", "INSERT INTO", "DELETE FROM", "UPDATE", "DECLARE", - "VERBOSE"); + "EXECUTE", "VERBOSE"); else if (Matches("EXPLAIN", "(*)") || Matches("EXPLAIN", "VERBOSE") || Matches("EXPLAIN", "ANALYZE", "VERBOSE")) - COMPLETE_WITH("SELECT", "INSERT INTO", "DELETE FROM", "UPDATE", "DECLARE"); + COMPLETE_WITH("SELECT", "INSERT INTO", "DELETE FROM", "UPDATE", "DECLARE", + "EXECUTE"); /* FETCH && MOVE */ -- 2.30.2
Re: [PATCH] Add tab completion for EXECUTE after EXPLAIN
From
ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)
Date:
ilmari@ilmari.org (Dagfinn Ilmari Mannsåker) writes: > Hi hackers, > > Here's a patch adding EXECUTE to the list of of commands tab completed > after the various EXPLAIN variants. Added to the 2021-09 commitfest: https://commitfest.postgresql.org/34/3279/ - ilmari
On Sat, Aug 07, 2021 at 11:23:28PM +0100, Dagfinn Ilmari Mannsåker wrote: >> Here's a patch adding EXECUTE to the list of of commands tab completed >> after the various EXPLAIN variants. I see no problems with that, so applied. Thanks. -- Michael