Re: Add missing tab completion for VACUUM and ANALYZE with ONLY option

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: vignesh C <vignesh21@gmail.com>
Cc: David Rowley <dgrowleyml@gmail.com>, Ilia Evdokimov <ilya.evdokimov@tantorlabs.com>, pgsql-hackers@lists.postgresql.org, postgresql.wizard@gmail.com
Date: 2025-03-23T21:20:52Z
Lists: pgsql-hackers
vignesh C <vignesh21@gmail.com> writes:
> On Wed, 19 Mar 2025 at 18:12, David Rowley <dgrowleyml@gmail.com> wrote:
>> While VACUUM ONLY on a partitioned table has no effect, the same isn't
>> true for inheritance parents. 62ddf7ee9 did change the behaviour of
>> VACUUM for these so that vacuuming the inheritance parent now vacuums
>> all of its children, unless ONLY is used. So, I'd say if the tab
>> completion is only added to ANALYZE, then it'd be incomplete still.
>> (I've not looked at the v3 patch to see which of those it handles.)

> I also felt it is necessary for both ANALYZE and VACUUM, and the v3
> patch includes changes for both.

Agreed.

Pushed with some cosmetic adjustments.  I made the order of the
options match the syntax diagrams in the comments, which is just
neatnik-ism (it changes no behavior) but seemed to read better.
I also realized that we could simplify the match patterns for the
various VACUUM cases by using MatchAnyN --- the existing code was
getting rather contorted there.  That wasn't something your patch
introduced, but might as well fix it while we're here.

			regards, tom lane



Commits

  1. psql: Add tab completion for VACUUM and ANALYZE ... ONLY option.