Re: NOT NULL NOT ENFORCED - Mailing list pgsql-hackers

From jian he
Subject Re: NOT NULL NOT ENFORCED
Date
Msg-id CACJufxHvGs7RR97-vN61Y2mZaF2YEgpHScw5SFG=TghFQAN9gA@mail.gmail.com
Whole thread
In response to Re: NOT NULL NOT ENFORCED  (jian he <jian.universality@gmail.com>)
List pgsql-hackers
On Tue, Mar 3, 2026 at 4:03 PM jian he <jian.universality@gmail.com> wrote:
>
> It turns out that the change for NOT ENFORCED NOT NULL is pg_dump.c is
> not complicated.
>
> CREATE TABLE ne_nn_tbl (x int, CONSTRAINT nn NOT NULL x NOT ENFORCED);
> Now the pg_dump output is
>
> CREATE TABLE public.ne_nn_tbl (
>     x integer CONSTRAINT nn NOT NULL NOT ENFORCED
> );
>
> but the 002_pg_dump.pl is failing....
>

Hi.
v5 is attached.
Now the 002_pg_dump.pl is written by Claude.
Claude also found that v4 failed completely for ALTER TABLE
MERGE/SPLIT PARTITIONS.

I am aware of the complexity of
https://git.postgresql.org/cgit/postgresql.git/commit/?id=0cd17fdd3c000f6e64e79da0fea5e65dc9f562df
However, we currently do not support altering a NOT NULL constraint's
enforceability, so we are fine for now.
But I hope the new tests in src/test/regress/sql/inherit.sql cover all
the corner cases.

Attachment

pgsql-hackers by date:

Previous
From: Chao Li
Date:
Subject: Re: Add a hook for handling logical decoding messages on subscribers.
Next
From: David Rowley
Date:
Subject: Re: Whole row var issue