Skip to content

Commit 3465113

Browse files
committed
Add tab completion for EXPLAIN .. EXECUTE in psql
Author: Dagfinn Ilmari Mannsåker Discussion: https://posgr.es/m/871r75gd0i.fsf@wibble.ilmari.org
1 parent 170aec6 commit 3465113

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/bin/psql/tab-complete.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3218,7 +3218,7 @@ psql_completion(const char *text, int start, int end)
32183218
*/
32193219
else if (Matches("EXPLAIN"))
32203220
COMPLETE_WITH("SELECT", "INSERT INTO", "DELETE FROM", "UPDATE", "DECLARE",
3221-
"ANALYZE", "VERBOSE");
3221+
"EXECUTE", "ANALYZE", "VERBOSE");
32223222
else if (HeadMatches("EXPLAIN", "(*") &&
32233223
!HeadMatches("EXPLAIN", "(*)"))
32243224
{
@@ -3237,11 +3237,12 @@ psql_completion(const char *text, int start, int end)
32373237
}
32383238
else if (Matches("EXPLAIN", "ANALYZE"))
32393239
COMPLETE_WITH("SELECT", "INSERT INTO", "DELETE FROM", "UPDATE", "DECLARE",
3240-
"VERBOSE");
3240+
"EXECUTE", "VERBOSE");
32413241
else if (Matches("EXPLAIN", "(*)") ||
32423242
Matches("EXPLAIN", "VERBOSE") ||
32433243
Matches("EXPLAIN", "ANALYZE", "VERBOSE"))
3244-
COMPLETE_WITH("SELECT", "INSERT INTO", "DELETE FROM", "UPDATE", "DECLARE");
3244+
COMPLETE_WITH("SELECT", "INSERT INTO", "DELETE FROM", "UPDATE", "DECLARE",
3245+
"EXECUTE");
32453246

32463247
/* FETCH && MOVE */
32473248

0 commit comments

Comments
 (0)