Re: BUG #19074: pg_dump from v18 loses the NOT NULL flag in the inherited table field when dumping v17-databases

Dilip Kumar <dilipbalaut@gmail.com>

From: Dilip Kumar <dilipbalaut@gmail.com>
To: David Rowley <dgrowleyml@gmail.com>
Cc: andrewbille@gmail.com, pgsql-bugs@lists.postgresql.org, Álvaro Herrera <alvherre@kurilemu.de>
Date: 2025-10-06T06:22:21Z
Lists: pgsql-bugs

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix determination of not-null constraint "locality" for inherited columns

  2. Fix pg_dump sorting of foreign key constraints

  3. Sort dump objects independent of OIDs, for the 7 holdout object types.

  4. Add pg_constraint rows for not-null constraints

On Mon, Oct 6, 2025 at 9:29 AM David Rowley <dgrowleyml@gmail.com> wrote:
>
> On Mon, 6 Oct 2025 at 16:42, Dilip Kumar <dilipbalaut@gmail.com> wrote:
> > I tried to reproduce this, but here is what I see[1] when I dump in
> > REL_18_STABLE, I noticed that "NOT NULL a" for inherited tables is
> > included along with the create table statement itself, so this doesn't
> > seems like an issue, am I missing something?
>
> I think so. I believe the intent was to convey the server version is
> 17.6 and the pg_dump version is 18.0, in which case, there does appear
> to be a problem.
>

Yeah you are right, while checking the git log, it seems it got broken
in this commit [1].  So I just tested on the previous commit and it
was working fine but got broken on this commit.  Adding Alvaro as he
has committed this.

[1]
commit 14e87ffa5c543b5f30ead7413084c25f7735039f
Author: Álvaro Herrera <alvherre@alvh.no-ip.org>
Date:   Fri Nov 8 13:28:48 2024 +0100
    Add pg_constraint rows for not-null constraints


-- 
Regards,
Dilip Kumar
Google