From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
---|---|
To: | Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Cc: | Suraj Kharage <suraj(dot)kharage(at)enterprisedb(dot)com> |
Subject: | Re: simplifying grammar for ALTER CONSTRAINT .. SET [NO] INHERIT |
Date: | 2025-03-26 11:55:47 |
Message-ID: | 8155857b-bfad-479c-bd2a-e9c9d78a7b27@eisentraut.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 25.03.25 17:02, Álvaro Herrera wrote:
> With commit f4e53e10b6ce we introduced a way to flip the NO INHERIT bit
> on not-null constraints. However, because of the way the grammar
> dealt with ALTER CONSTRAINT, we were too blind to see a way to implement
> it using the existing production. It turns out that we can remove it,
> so the commands would be
>
> ALTER TABLE tab ALTER CONSTRAINT constr INHERIT
> ALTER TABLE tab ALTER CONSTRAINT constr NO INHERIT
>
> i.e. the word SET is no longer needed.
>
> Do people find this better?
This seems better, considering that the SQL-standard syntax for ENFORCED is:
ALTER TABLE tab ALTER CONSTRAINT constr ENFORCED
ALTER TABLE tab ALTER CONSTRAINT constr NOT ENFORCED
also without "SET".
From | Date | Subject | |
---|---|---|---|
Next Message | Marcos Pegoraro | 2025-03-26 11:58:15 | Re: gamma() and lgamma() functions |
Previous Message | Antonin Houska | 2025-03-26 11:39:39 | Re: why there is not VACUUM FULL CONCURRENTLY? |