On Thu, 14 Aug 2025 at 07:47, jian he <jian.universality@gmail.com> wrote:
>
> hi.
> rebase and minor cosmetic change.
Hi!
It appears satisfactory to me.
I have few observations.
One is whether we should now support CREATE DOMAIN ... NOT NULL NOT
VALID syntax? This could be a separate patch though.
Second observation is just a question:
```
reshke=# create domain dd as int;
CREATE DOMAIN
reshke=# create table dt(i int, c dd);
CREATE TABLE
reshke=# insert into dt values(1,null);
INSERT 0 1
reshke=# alter domain dd add constraint c not null not valid ;
ALTER DOMAIN
reshke=# update dt set i = i + 1;
UPDATE 1
reshke=# update dt set i = i + 1, c =null;
ERROR: domain dd does not allow null values
reshke=# table dt;
i | c
---+---
2 |
(1 row)
```
Is this behaviour correct? Meaning first update is successful while
second is not, yet they would produce the same result.
And last is about psql-tab-complete: we now can complete 'alter domain
... add constraint .. not null' with 'not valid'. This also could be
a separate patch.
--
Best regards,
Kirill Reshke