Re: simplifying grammar for ALTER CONSTRAINT .. SET [NO] INHERIT - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: simplifying grammar for ALTER CONSTRAINT .. SET [NO] INHERIT
Date
Msg-id 8155857b-bfad-479c-bd2a-e9c9d78a7b27@eisentraut.org
Whole thread Raw
In response to simplifying grammar for ALTER CONSTRAINT .. SET [NO] INHERIT  (Álvaro Herrera <alvherre@alvh.no-ip.org>)
List 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".




pgsql-hackers by date:

Previous
From: Antonin Houska
Date:
Subject: Re: why there is not VACUUM FULL CONCURRENTLY?
Next
From: Marcos Pegoraro
Date:
Subject: Re: gamma() and lgamma() functions