Re: add tab-complete for ALTER DOMAIN ADD...

Fujii Masao <masao.fujii@oss.nttdata.com>

From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: Álvaro Herrera <alvherre@kurilemu.de>, Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Cc: jian he <jian.universality@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2025-05-12T08:27:41Z
Lists: pgsql-hackers

On 2025/05/11 23:22, Álvaro Herrera wrote:
> On 2025-Apr-29, Dagfinn Ilmari Mannsåker wrote:
> 
>> jian he <jian.universality@gmail.com> writes:
> 
>>> +	/* ALTER DOMAIN <sth> ADD */
>>> +	else if (Matches("ALTER", "DOMAIN", MatchAny, "ADD"))
>>> +		COMPLETE_WITH("CONSTRAINT", "NOT NULL", "CHECK");
>>
>> I think the completion for CHECK should include the opening paren too,
>> since that's required for the expression.
> 
> Yeah, we do that elsewhere.
> 
>> We could also add completion after CONSTRAINT <name>, like this:
>>
>> 	else if(Matches("ALTER", "DOMAIN", MatchAny, "ADD", "CONSTRAINT", MatchAny))
>> 		COMPLETE_WITH("NOT NULL", "CHECK (");
> 
> Done that, and pushed.

I have no objection to this commit. However, I had assumed we would
wait to commit changes like this - which aren't bug fixes or
v18-related oversights - until master becomes the development branch
for v19. Maybe I'm missing something..

We can go ahead with this one because it's a small change? Just checking,
since I have a few similar tab-completion improvements patches and
have been holding off until v19 development begins. If it's fine,
I'm thinking of committing them soon as well.

Regards,

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION




Commits

  1. Add tab-completion for ALTER TABLE not-nulls

  2. Add tab-complete for ALTER DOMAIN ADD [CONSTRAINT]