diff --git a/src/bin/psql/tab-complete.in.c b/src/bin/psql/tab-complete.in.c index e9af7b37ac8..31c77214b4f 100644 --- a/src/bin/psql/tab-complete.in.c +++ b/src/bin/psql/tab-complete.in.c @@ -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"))