Content-Length: 262204 | pFad | http://github.com/postgrespro/postgres/commit/3429145d42e0aee0565328c8ca8378ed17b300dc

02 psql: Tab completion for JOIN ... USING column list · postgrespro/postgres@3429145 · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/3429145d42e0aee0565328c8ca8378ed17b300dc

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy