Re: PG 18 release notes draft committed - Mailing list pgsql-hackers

From Álvaro Herrera
Subject Re: PG 18 release notes draft committed
Date
Msg-id 202505041135.cpo7zgdcya2u@alvherre.pgsql
Whole thread Raw
In response to PG 18 release notes draft committed  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
Regarding these items

* Allow ALTER TABLE to set the NOT VALID attribute of NOT NULL constraints
  (Rushabh Lathia, Jian He)

* Allow NOT VALID foreign key constraints on partitioned tables (Amul Sul)

* Allow modification of the inheritability of constraints (Suraj Kharage, Álvaro Herrera)

  The syntax is ALTER TABLE ... ALTER CONSTRAINT ... [NO] INHERIT.

* Store column NOT NULL specifications in pg_constraint (Álvaro Herrera, Bernd Helmle)

  This allows names to be specified for NOT NULL constraint. This also adds NOT
  NULL constraints to foreign tables and NOT NULL inheritance control to local
  tables.


I think the wording and order of them is a bit unclear.  I would put the
last item first, immediately followed by the other two; alternatively we
could merge them all into a single one:

* Store NOT NULL constraints in pg_constraint for better preservability
  (Álvaro, Bernd, Suraj, Rushabh, Jian)

  The constraint names are well defined and are preserved across
  dump/restore.  Also, the NOT VALID and NO INHERIT properties work
  as expected and can be modified by users via ALTER TABLE.

Or something along those lines.

This one in particular:
  Allow modification of the inheritability of constraints (Suraj Kharage, Álvaro Herrera)

  The syntax is ALTER TABLE ... ALTER CONSTRAINT ... [NO] INHERIT.

only works with not-null constraints, which is why I suggest to merge
together with the above item.  Ideally, on the next release somebody
would work to make that feature more general (work with other types of
constraints).


I think this item
  Allow CHECK and foreign key constraints to be specified as NOT ENFORCED
  (Amul Sul)

  This also adds column pg_constraint.conenforced.

should come second or maybe even first in that section, as it is I think
the most user-visible.


These two items
  Allow NOT VALID foreign key constraints on partitioned tables (Amul Sul)

  Allow dropping of constraints ONLY on partitioned tables (Álvaro Herrera)

  This was previously erroneously prohibited.

can mostly be considered bug-fixes, so they should be last in the
section; they aren't new features, just making existing features work
correctly.  The one I have second is I think of lesser importance.

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
"I'm impressed how quickly you are fixing this obscure issue. I came from 
MS SQL and it would be hard for me to put into words how much of a better job
you all are doing on [PostgreSQL]."
 Steve Midgley, http://archives.postgresql.org/pgsql-sql/2008-08/msg00000.php



pgsql-hackers by date:

Previous
From: Dmitry Dolgov
Date:
Subject: Re: queryId constant squashing does not support prepared statements
Next
From: Etsuro Fujita
Date:
Subject: Re: Options to control remote transactions’ access/deferrable modes in postgres_fdw