Re: ALTER DOMAIN ADD NOT NULL NOT VALID - Mailing list pgsql-hackers

From jian he
Subject Re: ALTER DOMAIN ADD NOT NULL NOT VALID
Date
Msg-id CACJufxFUydOCGS_Y=iJOr5Q0f+wQZBNJbaee-KpH+nSdUr-F1Q@mail.gmail.com
Whole thread Raw
In response to Re: ALTER DOMAIN ADD NOT NULL NOT VALID  (Kirill Reshke <reshkekirill@gmail.com>)
List pgsql-hackers
hi.

please check the attached latest version.

I did some minor cosmetic changes.
similar to commit 16a0039, we can just use ShareUpdateExclusiveLock to validate
existing not-valid not null constraints

for the below issue (should the last UPDATE fail or not),
I have already created a thread at [1].
--------------
create domain d1 as int;
create table dt1(i int, c d1);
insert into dt1 values(1,2);
alter domain d1 add constraint cc check(value <> 2) not valid;
update dt1 set i = i + 1;
--------------

[1]: https://postgr.es/m/CACJufxE2oFcLmrqDrqJrH5k03fv+v9=+-PBs-mV5WsJ=31XMyw@mail.gmail.com

Attachment

pgsql-hackers by date:

Previous
From: Richard Guo
Date:
Subject: Re: Inconsistent Behavior of GROUP BY ROLLUP in v17 vs master
Next
From: John Naylor
Date:
Subject: Re: [PATCH] Hex-coding optimizations using SVE on ARM.