From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
---|---|
To: | jian he <jian(dot)universality(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, vignesh C <vignesh21(at)gmail(dot)com>, Aleksander Alekseev <aleksander(at)timescale(dot)com> |
Subject: | Re: Catalog domain not-null constraints |
Date: | 2024-02-11 21:10:10 |
Message-ID: | 8734d87c-6aa0-4d4f-808e-f645b8489683@eisentraut.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 08.02.24 13:17, jian he wrote:
> I think I found a bug.
> connotnull already set to not null.
> every execution of `alter domain connotnull add not null value ;`
> would concatenate 'NOT NULL VALUE' for the "Check" column,
I would have expected that. Each invocation adds a new constraint.
But I see that table constraints do not work that way. A command like
ALTER TABLE t1 ADD NOT NULL c1 does nothing if the column already has a
NOT NULL constraint. I'm not sure this is correct. At least it's not
documented. We should probably make the domains feature work the same
way, but I would like to understand why it works that way first.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2024-02-11 21:42:44 | Re: Catalog domain not-null constraints |
Previous Message | David Benjamin | 2024-02-11 18:19:00 | [PATCH] Avoid mixing custom and OpenSSL BIO functions |