Re: Catalog domain not-null constraints
От | jian he |
---|---|
Тема | Re: Catalog domain not-null constraints |
Дата | |
Msg-id | CACJufxG_M9iejZ71Y0z8rRW8ttsBbfD8UbEXwjaOUgw-575BWg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Catalog domain not-null constraints (Aleksander Alekseev <aleksander@timescale.com>) |
Ответы |
Re: Catalog domain not-null constraints
|
Список | pgsql-hackers |
create domain connotnull integer; create table domconnotnulltest ( col1 connotnull , col2 connotnull ); alter domain connotnull add not null value; --------------------------- the above query does not work in pg16. ERROR: syntax error at or near "not". after applying the patch, now this works. this new syntax need to be added into the alter_domain.sgml's synopsis and also need an explanation varlistentry? + /* + * Store the constraint in pg_constraint + */ + ccoid = + CreateConstraintEntry(constr->conname, /* Constraint Name */ + domainNamespace, /* namespace */ + CONSTRAINT_NOTNULL, /* Constraint Type */ + false, /* Is Deferrable */ + false, /* Is Deferred */ + !constr->skip_validation, /* Is Validated */ + InvalidOid, /* no parent constraint */ + InvalidOid, /* not a relation constraint */ + NULL, + 0, + 0, + domainOid, /* domain constraint */ + InvalidOid, /* no associated index */ + InvalidOid, /* Foreign key fields */ + NULL, + NULL, + NULL, + NULL, + 0, + ' ', + ' ', + NULL, + 0, + ' ', + NULL, /* not an exclusion constraint */ + NULL, + NULL, + true, /* is local */ + 0, /* inhcount */ + false, /* connoinherit */ + false, /* conwithoutoverlaps */ + false); /* is_internal */ /* conwithoutoverlaps */ should be /* conperiod */
В списке pgsql-hackers по дате отправления: