Re: TAB completion for ALTER TABLE ... ALTER CONSTRAINT ... ENFORCED - Mailing list pgsql-hackers

From Roman Khapov
Subject Re: TAB completion for ALTER TABLE ... ALTER CONSTRAINT ... ENFORCED
Date
Msg-id FDAC79A9-6DB4-4C17-9B46-0A93DAAB5262@yandex-team.ru
Whole thread Raw
In response to TAB completion for ALTER TABLE ... ALTER CONSTRAINT ... ENFORCED  (Kirill Reshke <reshkekirill@gmail.com>)
Responses Re: TAB completion for ALTER TABLE ... ALTER CONSTRAINT ... ENFORCED
List pgsql-hackers

> On 11 Aug 2025, at 18:20, Kirill Reshke <reshkekirill@gmail.com> wrote:
>
> Hi hackers!
>
> While looking at [0] I noticed that  current psql tab-complete lacks support for
>
> ALTER TABLE ... ALTER CONSTRAINT ... [NOT] ENFORCED and
>
> ALTER TABLE ... ALTER CONSTRAINT ... [NO] INHERIT
>
> patterns.

Hi!

> COMPLETE_WITH("ENFORCED", "NOT ENFORCED", "NO INHERIT", "INHERIT");

According to gram.y there might be DEFERRABLE and NOT DEFERRABLE, INITIALLY IMMEDIATE and INITIALLY DEFERRED (NOT VALID
isacceptable by rules but not by the action) 

Maybe we can add them too? If so, i attached v2 patch with this options added.

--
Best regards,
Roman Khapov




Attachment

pgsql-hackers by date:

Previous
From: Nitin Jadhav
Date:
Subject: Re: Change checkpoint‑record‑missing PANIC to FATAL
Next
From: Roman Khapov
Date:
Subject: [PATCH] Fix escaping for '\' and '"' in pageinspect for gist