On Mon, 18 Aug 2025 at 09:09, jian he <jian.universal...@gmail.com> wrote:
> CREATE DOMAIN use ColConstraintElem. > that's why we do not support syntax: > ``create domain t1 as int not null not valid;`` > > we also do not support column constraints NOT NULL NOT VALID. > Like > ``create table t(a int not null not valid);`` > will error out. > so I guess it's fine to not support it? Indeed. > so currently I don't know how to support syntax > ``create domain t1 as int not null not valid;`` Ok. > I also found it's hard to psql-tab-complete for > 'alter domain ... add constraint .. not null' with 'not valid'. I am under the impression it is pretty trivial. I mean, isn't this enough? ``` /* ALTER DOMAIN <sth> ADD CONSTRAINT <sth> NOT NULL */ else if (Matches("ALTER", "DOMAIN", MatchAny, "ADD", "CONSTRAINT", MatchAny, "NOT", "NULL")) COMPLETE_WITH("NOT VALID"); ``` Anyway, this is purely optional and can be a separate topic. I propose to focus on Alvaro's feedback for now. -- Best regards, Kirill Reshke