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

From: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
To: Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>
Cc: 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-11 14:22:09
Message-ID: 202505111422.6ynxzsibjtfk@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2025-Apr-29, Dagfinn Ilmari Mannsåker wrote:

> jian he <jian(dot)universality(at)gmail(dot)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.

--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
"Los dioses no protegen a los insensatos. Éstos reciben protección de
otros insensatos mejor dotados" (Luis Wu, Mundo Anillo)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Álvaro Herrera 2025-05-11 14:48:58 Re: add tab-complete for ALTER DOMAIN ADD...
Previous Message Álvaro Herrera 2025-05-11 13:54:02 Re: Trivial comment fix for tsquerysend()