From e9bd84014dd38629899af4d609785525c5c2abc5 Mon Sep 17 00:00:00 2001 From: alterego655 <824662526@qq.com> Date: Mon, 29 Sep 2025 14:25:57 +0800 Subject: [PATCH v1] Add tab completion support for WAIT FOR command Implement tab completion for the WAIT FOR LSN command in psql. --- src/bin/psql/tab-complete.in.c | 43 +++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/src/bin/psql/tab-complete.in.c b/src/bin/psql/tab-complete.in.c index 6176741d20b..2f710484d92 100644 --- a/src/bin/psql/tab-complete.in.c +++ b/src/bin/psql/tab-complete.in.c @@ -1260,7 +1260,7 @@ static const char *const sql_commands[] = { "REASSIGN", "REFRESH MATERIALIZED VIEW", "REINDEX", "RELEASE", "RESET", "REVOKE", "ROLLBACK", "SAVEPOINT", "SECURITY LABEL", "SELECT", "SET", "SHOW", "START", - "TABLE", "TRUNCATE", "UNLISTEN", "UPDATE", "VACUUM", "VALUES", "WITH", + "TABLE", "TRUNCATE", "UNLISTEN", "UPDATE", "VACUUM", "VALUES", "WAIT FOR", "WITH", NULL }; @@ -5273,6 +5273,47 @@ match_previous_words(int pattern_id, else if (HeadMatches("VACUUM")) COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_vacuumables); +/* + * WAIT FOR LSN '' [ [WITH] (