From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: jian he <jian.universality@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Alexander Lakhin <exclusion@gmail.com>
Cc: Dean Rasheed <dean.a.rasheed@gmail.com>
Cc: Peter Eisentraut <peter@eisentraut.org>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: cataloguing NOT NULL constraints
Date: Mon, 15 Apr 2024 15:20:55 +0200
Message-ID: <202404151320.uqfxlcnl4zrp@alvherre.pgsql> (raw)
In-Reply-To: <CACJufxGmy-Xncq-NHJ9rHbQJrGu5bZtcyT2v-6-ZbgpE9htMpQ@mail.gmail.com>
(I think I had already argued this point, but I don't see it in the
archives, so here it is again).
On 2024-Feb-07, jian he wrote:
> if you place CommandCounterIncrement inside the `if (recurse)` branch,
> then the regression test will be ok.
Yeah, but don't you think this is too magical? I mean, randomly added
CCIs in the execution path for other reasons would break this. Worse --
how can we _ensure_ that no CCIs occur at all? I mean, it's possible
that an especially crafted multi-subcommand ALTER TABLE could contain
just the right CCI to break things in the opposite way. The difference
in behavior would be difficult to justify. (For good or ill, ALTER
TABLE ATTACH PARTITION cannot run in a multi-subcommand ALTER TABLE, so
this concern might be misplaced. Still, more certainty seems better
than less.)
I've pushed both these patches now, adding what seemed a reasonable set
of test cases. If there still are cases behaving in unexpected ways,
please let me know.
--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/
"La espina, desde que nace, ya pincha" (Proverbio africano)
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-hackers@postgresql.org
Cc: alvherre@alvh.no-ip.org, jian.universality@gmail.com, michael@paquier.xyz, exclusion@gmail.com, dean.a.rasheed@gmail.com, peter@eisentraut.org, robertmhaas@gmail.com, pgsql-hackers@lists.postgresql.org
Subject: Re: cataloguing NOT NULL constraints
In-Reply-To: <202404151320.uqfxlcnl4zrp@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