Skip to content

Commit 3429145

Browse files
committed
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
1 parent a01f6fa commit 3429145

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/bin/psql/tab-complete.in.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5179,6 +5179,10 @@ match_previous_words(int pattern_id,
51795179
TailMatches("JOIN", MatchAny, MatchAny, "USING") ||
51805180
TailMatches("JOIN", "LATERAL", MatchAny, MatchAny, "USING"))
51815181
COMPLETE_WITH("(");
5182+
else if (TailMatches("JOIN", MatchAny, "USING", "("))
5183+
COMPLETE_WITH_ATTR(prev3_wd);
5184+
else if (TailMatches("JOIN", MatchAny, MatchAny, "USING", "("))
5185+
COMPLETE_WITH_ATTR(prev4_wd);
51825186

51835187
/* ... AT [ LOCAL | TIME ZONE ] ... */
51845188
else if (TailMatches("AT"))

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy