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

From: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
To: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
Cc: Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>, jian he <jian(dot)universality(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: add tab-complete for ALTER DOMAIN ADD...
Date: 2025-05-12 15:47:45
Message-ID: 202505121547.yl7lqkne5jqc@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2025-May-12, Fujii Masao wrote:

> 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..

Yeah, fair question. We got new syntax to add NOT NULL constraints, and
this adds tab-completion for that. It does, in addition, add
tab-completion for CHECK constraints and for the CONSTRAINT keyword,
which is much older syntax. So I guess you could argue that it would
have been okay to add the NOT NULL one (it could be considered an open
item), but not the the other two because they're instead a "new
feature". But that helps nobody, because we would be offering _some_
options in a command but not all possible ones, which I think is even
worse because it'd be misleading.

Consider the other patch I sent later. It adds tab-completion coverage
for the new NOT NULL syntax in ALTER TABLE, so it should be fair game
for 18, shouldn't it? Again: it'd be misleading not to tab-complete
that syntax, because it would confuse people into failing to realize
that that syntax exists, if they see other options but not that one.

As for whether your proposed tab-completion improvements are acceptable
to be included now, I guess it's all subjective on what exactly they
are.

--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
"I think my standards have lowered enough that now I think 'good design'
is when the page doesn't irritate the living f*ck out of me." (JWZ)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrey Borodin 2025-05-12 15:47:58 Allow reading LSN written by walreciever, but not flushed yet
Previous Message Andrey Borodin 2025-05-12 15:42:11 Re: Small fixes needed by high-availability tools