From 5dd5786b94cea4652035a5dc55c103ed09b0365b Mon Sep 17 00:00:00 2001 From: Tomas Vondra Date: Mon, 16 Dec 2024 17:55:00 +0100 Subject: [PATCH] psql: Tab completion for LATERAL joins When listing selectable objects after a JOIN, offer also LATERAL. Author: Andreas Karlsson Reviewed-By: Tomas Vondra Discussion: https://postgr.es/m/3a7e27bc-d6ed-4cb0-9b21-f21143fc1b37@proxel.se --- src/bin/psql/tab-complete.in.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/psql/tab-complete.in.c b/src/bin/psql/tab-complete.in.c index 9e23272fc0e..6a9c5e240fb 100644 --- a/src/bin/psql/tab-complete.in.c +++ b/src/bin/psql/tab-complete.in.c @@ -5166,7 +5166,7 @@ match_previous_words(int pattern_id, /* ... JOIN ... */ else if (TailMatches("JOIN")) - COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_selectables); + COMPLETE_WITH_SCHEMA_QUERY_PLUS(Query_for_list_of_selectables, "LATERAL"); /* ... AT [ LOCAL | TIME ZONE ] ... */ else if (TailMatches("AT"))