mirror of
https://github.com/postgres/postgres.git
synced 2026-04-15 22:10:45 -04:00
psql: Tab completion for JOIN ... USING column list
For JOIN ... USING, offer attribute names for the first member of the column list. Author: Andreas Karlsson Reviewed-By: Tomas Vondra Discussion: https://postgr.es/m/3a7e27bc-d6ed-4cb0-9b21-f21143fc1b37@proxel.se
This commit is contained in:
parent
a01f6fa6ad
commit
3429145d42
1 changed files with 4 additions and 0 deletions
|
|
@ -5179,6 +5179,10 @@ match_previous_words(int pattern_id,
|
|||
TailMatches("JOIN", MatchAny, MatchAny, "USING") ||
|
||||
TailMatches("JOIN", "LATERAL", MatchAny, MatchAny, "USING"))
|
||||
COMPLETE_WITH("(");
|
||||
else if (TailMatches("JOIN", MatchAny, "USING", "("))
|
||||
COMPLETE_WITH_ATTR(prev3_wd);
|
||||
else if (TailMatches("JOIN", MatchAny, MatchAny, "USING", "("))
|
||||
COMPLETE_WITH_ATTR(prev4_wd);
|
||||
|
||||
/* ... AT [ LOCAL | TIME ZONE ] ... */
|
||||
else if (TailMatches("AT"))
|
||||
|
|
|
|||
Loading…
Reference in a new issue