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

From: Ilia Evdokimov <ilya(dot)evdokimov(at)tantorlabs(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Add missing tab completion for VACUUM and ANALYZE with ONLY option
Date: 2025-03-18 14:57:19
Message-ID: 1a5c1ce2-2af5-4ba1-bc42-fe5d2bb2d564@tantorlabs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 18.03.2025 15:25, vignesh C wrote:
> On Thu, 27 Feb 2025 at 11:42, vignesh C <vignesh21(at)gmail(dot)com> wrote:
>> On Thu, 6 Feb 2025 at 16:29, Umar Hayat <postgresql(dot)wizard(at)gmail(dot)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

Hi,

Thank you for the patch. However, Is it ok if I can't tab 'ONLY' in
VACUUM ANALYZE command?

CREATE TABLE only_parted (a int, b text) PARTITION BY LIST (a);
CREATE TABLE only_parted1 PARTITION OF only_parted FOR VALUES IN (1);
INSERT INTO only_parted VALUES (1, 'a');

VACUUM ANALYZE {Press Tab}

information_schema.  only_parted          only_parted1 public.

-----------------------------------------------------------------------------

Although it works:

postgres=# VACUUM ANALYZE ONLY only_parted;
WARNING:  VACUUM ONLY of partitioned table "only_parted" has no effect
VACUUM
postgres=#

--
Best regards,
Ilia Evdokimov,
Tantor Labs LLC.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2025-03-18 15:06:52 Re: doc patch: wrong descriptions for dropping replication slots
Previous Message Matheus Alcantara 2025-03-18 14:56:51 Re: PoC. The saving of the compiled jit-code in the plan cache