]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
psql: Tab completion for CHECKPOINT FLUSH_UNLOGGED boolean options
authorDaniel Gustafsson <dgustafsson@postgresql.org>
Mon, 25 May 2026 09:57:14 +0000 (11:57 +0200)
committerDaniel Gustafsson <dgustafsson@postgresql.org>
Mon, 25 May 2026 09:57:14 +0000 (11:57 +0200)
Tab completion for CHECKPOINT options contained FLUSH_UNLOGGED, but
the boolean value was not part of the completion.  Fix to make this
consistent with other boolean values.

Author: Chao Li <lic@highgo.com>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Discussion: https://postgr.es/m/4855807D-F1CA-44E6-9B58-406691832848@gmail.com

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

index 364546c13e8a16b5ab1c06590dde14939f98a157..de547a8cb379e6e42db11b159539227bb37c99d2 100644 (file)
@@ -3274,6 +3274,8 @@ match_previous_words(int pattern_id,
                        COMPLETE_WITH("MODE", "FLUSH_UNLOGGED");
                else if (TailMatches("MODE"))
                        COMPLETE_WITH("FAST", "SPREAD");
+               else if (TailMatches("FLUSH_UNLOGGED"))
+                       COMPLETE_WITH("ON", "OFF");
        }
 /* CLOSE */
        else if (Matches("CLOSE"))