From afbc48bcc06d5668b8a3db3a0b3caba4a0f8a4a0 Mon Sep 17 00:00:00 2001
From: "Chao Li (Evan)" <lic@highgo.com>
Date: Mon, 25 May 2026 14:14:26 +0800
Subject: [PATCH v1 1/2] psql: Complete boolean values for CHECKPOINT
 FLUSH_UNLOGGED

Tab completion for CHECKPOINT option lists suggested FLUSH_UNLOGGED, but
once that option had been entered it did not offer the accepted boolean
values.  Add ON/OFF completion, matching other parenthesized boolean
option-list completions.

Author: Chao Li <lic@highgo.com>
---
 src/bin/psql/tab-complete.in.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/bin/psql/tab-complete.in.c b/src/bin/psql/tab-complete.in.c
index 364546c13e8..de547a8cb37 100644
--- a/src/bin/psql/tab-complete.in.c
+++ b/src/bin/psql/tab-complete.in.c
@@ -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"))
-- 
2.50.1 (Apple Git-155)

