pg.ddx.io pgsql-bugs@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Álvaro Herrera <alvherre@kurilemu.de>
To: Dilip Kumar <dilipbalaut@gmail.com>
Cc: David Rowley <dgrowleyml@gmail.com>
Cc: andrewbille@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #19074: pg_dump from v18 loses the NOT NULL flag in the inherited table field when dumping v17-databases
Date: Mon, 6 Oct 2025 12:44:28 +0200
Message-ID: <202510061043.hjzm5ixk5tfs@alvherre.pgsql> (raw)
In-Reply-To: <CAFiTN-stWLizPYn9DGiL+7uhdrWNebuXRK1Hg+uvgH34uqCMfg@mail.gmail.com>
On 2025-Oct-06, Dilip Kumar wrote:
> While quickly checking this commit, it seems the problem is that
> before this commit we had a simple logic to add an additional ALTER
> TABLE to SET NULL, if the attribute has a not null constraint but the
> the parent from which it is inherited doesn't have not null constraint
> [1]. Whereas after this commit, it seems we removed this ALTER
> command and tried to add the not null constraint while creating the
> inherited table itself, which is fine. But here the logic to identify
> whether the constraint is local or not for v17 is not correct [2], it
> sets "notnull_islocal", only if the "attislocal" is true, which seems
> to be wrong. Because the test case given in this bug the attribute is
> not local but it is marked not null.
Ah, right, the column is indeed not local, but the constraint is. I
think this means we need to use flagInhAttrs to require the constraint
to be printed ... looking.
--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
view thread (12+ messages) latest in thread
Message-ID: <202510061043.hjzm5ixk5tfs@alvherre.pgsql> Permalink: ../202510061043.hjzm5ixk5tfs@alvherre.pgsql/ Also on: postgresql.org/message-id/202510061043.hjzm5ixk5tfs@alvherre.pgsql ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients using the --to and --cc options: reply via email To: pgsql-bugs@postgresql.org Cc: alvherre@kurilemu.de, dilipbalaut@gmail.com, dgrowleyml@gmail.com, andrewbille@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #19074: pg_dump from v18 loses the NOT NULL flag in the inherited table field when dumping v17-databases In-Reply-To: <202510061043.hjzm5ixk5tfs@alvherre.pgsql> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox