pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix determination of not-null constraint "locality" for inherite 3+ messages / 1 participants [nested] [flat]
* pgsql: Fix determination of not-null constraint "locality" for inherite @ 2025-10-18 16:19 Álvaro Herrera <alvherre@kurilemu.de> 0 siblings, 0 replies; 3+ messages in thread From: Álvaro Herrera @ 2025-10-18 16:19 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix determination of not-null constraint "locality" for inherited columns It is possible to have a non-inherited not-null constraint on an inherited column, but we were failing to preserve such constraints during pg_upgrade where the source is 17 or older, because of a bug in the pg_dump query for it. Oversight in commit 14e87ffa5c54. Fix that query. In passing, touch-up a bogus nearby comment introduced by the same commit. In version 17, make the regression tests leave a table in this situation, so that this scenario is tested in the cross-version upgrade tests of 18 and up. Author: Dilip Kumar <dilipbalaut@gmail.com> Reported-by: Andrew Bille <andrewbille@gmail.com> Bug: #19074 Backpatch-through: 18 Discussion: https://postgr.es/m/19074-ae2548458cf0195c@postgresql.org Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/615ff828e1cb8eaa2a987d4390c5c9970fc1a3e6 Modified Files -------------- src/bin/pg_dump/pg_dump.c | 8 +++++--- src/test/regress/expected/constraints.out | 4 ++++ src/test/regress/sql/constraints.sql | 5 +++++ 3 files changed, 14 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Fix determination of not-null constraint "locality" for inherite @ 2025-10-18 16:19 Álvaro Herrera <alvherre@kurilemu.de> 0 siblings, 0 replies; 3+ messages in thread From: Álvaro Herrera @ 2025-10-18 16:19 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix determination of not-null constraint "locality" for inherited columns It is possible to have a non-inherited not-null constraint on an inherited column, but we were failing to preserve such constraints during pg_upgrade where the source is 17 or older, because of a bug in the pg_dump query for it. Oversight in commit 14e87ffa5c54. Fix that query. In passing, touch-up a bogus nearby comment introduced by the same commit. In version 17, make the regression tests leave a table in this situation, so that this scenario is tested in the cross-version upgrade tests of 18 and up. Author: Dilip Kumar <dilipbalaut@gmail.com> Reported-by: Andrew Bille <andrewbille@gmail.com> Bug: #19074 Backpatch-through: 18 Discussion: https://postgr.es/m/19074-ae2548458cf0195c@postgresql.org Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/c945b06d5f03e30cec279df516688c70787b2b2c Modified Files -------------- src/test/regress/expected/constraints.out | 4 ++++ src/test/regress/sql/constraints.sql | 5 +++++ 2 files changed, 9 insertions(+) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Fix determination of not-null constraint "locality" for inherite @ 2025-10-18 16:19 Álvaro Herrera <alvherre@kurilemu.de> 0 siblings, 0 replies; 3+ messages in thread From: Álvaro Herrera @ 2025-10-18 16:19 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix determination of not-null constraint "locality" for inherited columns It is possible to have a non-inherited not-null constraint on an inherited column, but we were failing to preserve such constraints during pg_upgrade where the source is 17 or older, because of a bug in the pg_dump query for it. Oversight in commit 14e87ffa5c54. Fix that query. In passing, touch-up a bogus nearby comment introduced by the same commit. In version 17, make the regression tests leave a table in this situation, so that this scenario is tested in the cross-version upgrade tests of 18 and up. Author: Dilip Kumar <dilipbalaut@gmail.com> Reported-by: Andrew Bille <andrewbille@gmail.com> Bug: #19074 Backpatch-through: 18 Discussion: https://postgr.es/m/19074-ae2548458cf0195c@postgresql.org Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/0fe07fa115f520a67b9a9180cea703e91d8c7ac4 Modified Files -------------- src/bin/pg_dump/pg_dump.c | 8 +++++--- src/test/regress/expected/constraints.out | 4 ++++ src/test/regress/sql/constraints.sql | 5 +++++ 3 files changed, 14 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2025-10-18 16:19 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2025-10-18 16:19 pgsql: Fix determination of not-null constraint "locality" for inherite Álvaro Herrera <alvherre@kurilemu.de> 2025-10-18 16:19 pgsql: Fix determination of not-null constraint "locality" for inherite Álvaro Herrera <alvherre@kurilemu.de> 2025-10-18 16:19 pgsql: Fix determination of not-null constraint "locality" for inherite Álvaro Herrera <alvherre@kurilemu.de>
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