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