psql: Fix tab completion for VACUUM option values

From: Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>
To: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: psql: Fix tab completion for VACUUM option values
Date: 2025-12-22 17:15:09
Message-ID: 20251223021509.19bba68ecbbc70c9f983c2b4@sraoss.co.jp
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I noticed that tab completion for VACUUM option values is broken.
For example, ON or OFF should be suggested after
"VACUUM (VERBOSE", but this currently does not work.

I believe this issue was introduced by commit 8a3e4011, which added
tab completion for the ONLY option of VACUUM and ANALYZE, along with
some code simplification using MatchAnyN.

In addition, tab completion for the ONLY option is insufficient:
"ONLY" is not suggested immediately after a completed option list,
for example in "VACUUM (...) ONLY" or "ANALYZE (...) ONLY".

I've attached a patch to fix these issues.

Regards,
Yugo Nagata

--
Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>

Attachment Content-Type Size
0001-psql-Fix-tab-completion-for-VACUUM-option-values.patch text/x-diff 3.3 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Yugo Nagata 2025-12-22 17:22:53 Re: psql: tab-completion support for COPY ... TO/FROM STDIN, STDOUT, and PROGRAM
Previous Message Heikki Linnakangas 2025-12-22 16:24:53 Re: Improve the performance of Unicode Normalization Forms.