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

vignesh C <vignesh21@gmail.com>

From: vignesh C <vignesh21@gmail.com>
To: Umar Hayat <postgresql.wizard@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2025-03-18T12:25:07Z
Lists: pgsql-hackers

Attachments

On Thu, 27 Feb 2025 at 11:42, vignesh C <vignesh21@gmail.com> wrote:
>
> On Thu, 6 Feb 2025 at 16:29, Umar Hayat <postgresql.wizard@gmail.com> wrote:
>
> This will include "ONLY" also when we display the tables too:
> +       else if (HeadMatches("ANALYZE"))
> +
> COMPLETE_WITH_SCHEMA_QUERY_PLUS(Query_for_list_of_analyzables,
> "ONLY");
>
> like below:
> postgres=# analyze only t1
> information_schema.  ONLY                 public.              t1
>
> The same issue exists with vacuum too:
> postgres=# vacuum only t1
> information_schema.  ONLY                 public.              t1

The attached patch has the fixes for the above issue.

Regards,
Vignesh

Commits

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