Add tab completion for EXPLAIN .. EXECUTE in psql
Author: Dagfinn Ilmari Mannsåker Discussion: https://posgr.es/m/871r75gd0i.fsf@wibble.ilmari.org
This commit is contained in:
parent
170aec63cd
commit
3465113134
|
@ -3218,7 +3218,7 @@ psql_completion(const char *text, int start, int end)
|
||||||
*/
|
*/
|
||||||
else if (Matches("EXPLAIN"))
|
else if (Matches("EXPLAIN"))
|
||||||
COMPLETE_WITH("SELECT", "INSERT INTO", "DELETE FROM", "UPDATE", "DECLARE",
|
COMPLETE_WITH("SELECT", "INSERT INTO", "DELETE FROM", "UPDATE", "DECLARE",
|
||||||
"ANALYZE", "VERBOSE");
|
"EXECUTE", "ANALYZE", "VERBOSE");
|
||||||
else if (HeadMatches("EXPLAIN", "(*") &&
|
else if (HeadMatches("EXPLAIN", "(*") &&
|
||||||
!HeadMatches("EXPLAIN", "(*)"))
|
!HeadMatches("EXPLAIN", "(*)"))
|
||||||
{
|
{
|
||||||
|
@ -3237,11 +3237,12 @@ psql_completion(const char *text, int start, int end)
|
||||||
}
|
}
|
||||||
else if (Matches("EXPLAIN", "ANALYZE"))
|
else if (Matches("EXPLAIN", "ANALYZE"))
|
||||||
COMPLETE_WITH("SELECT", "INSERT INTO", "DELETE FROM", "UPDATE", "DECLARE",
|
COMPLETE_WITH("SELECT", "INSERT INTO", "DELETE FROM", "UPDATE", "DECLARE",
|
||||||
"VERBOSE");
|
"EXECUTE", "VERBOSE");
|
||||||
else if (Matches("EXPLAIN", "(*)") ||
|
else if (Matches("EXPLAIN", "(*)") ||
|
||||||
Matches("EXPLAIN", "VERBOSE") ||
|
Matches("EXPLAIN", "VERBOSE") ||
|
||||||
Matches("EXPLAIN", "ANALYZE", "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 */
|
/* FETCH && MOVE */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue