pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Report the correct table in publication duplicate-table errors 6+ messages / 1 participants [nested] [flat]
* pgsql: Report the correct table in publication duplicate-table errors @ 2026-11-25 14:44 Heikki Linnakangas <heikki.linnakangas@iki.fi> 0 siblings, 0 replies; 6+ messages in thread From: Heikki Linnakangas @ 2026-11-25 14:44 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Report the correct table in publication duplicate-table errors When a table is listed explicitly and also reached through its inheritance parent, CREATE/ALTER PUBLICATION reports "conflicting or redundant WHERE clauses" or "conflicting or redundant column lists". OpenTableList() reused the variable holding the explicitly named table for each child it opened. As a result, the error could report a different child (or the parent) instead of the table that was listed twice. For example, with parent p and children c1 and c2, "FOR TABLE c2, p WHERE (a > 0)" reported table "c1". Use a separate variable for the opened child and report the conflicting table in the error message. Author: Vignesh C <vignesh21@gmail.com> Discussion: https://www.postgresql.org/message-id/CALDaNm3vJ8QaHYZtqk+KbRomGWPYkAzxvWzyfs_=gnSVmyvW4g@mail.gmail... Backpatch-through: 15 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/048c8725bf9aaa4ce14727509f22c7eda68269da Modified Files -------------- src/backend/commands/publicationcmds.c | 9 +++++---- src/test/regress/expected/publication.out | 10 ++++++++++ src/test/regress/sql/publication.sql | 8 ++++++++ 3 files changed, 23 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Report the correct table in publication duplicate-table errors @ 2026-11-25 14:44 Heikki Linnakangas <heikki.linnakangas@iki.fi> 0 siblings, 0 replies; 6+ messages in thread From: Heikki Linnakangas @ 2026-11-25 14:44 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Report the correct table in publication duplicate-table errors When a table is listed explicitly and also reached through its inheritance parent, CREATE/ALTER PUBLICATION reports "conflicting or redundant WHERE clauses" or "conflicting or redundant column lists". OpenTableList() reused the variable holding the explicitly named table for each child it opened. As a result, the error could report a different child (or the parent) instead of the table that was listed twice. For example, with parent p and children c1 and c2, "FOR TABLE c2, p WHERE (a > 0)" reported table "c1". Use a separate variable for the opened child and report the conflicting table in the error message. Author: Vignesh C <vignesh21@gmail.com> Discussion: https://www.postgresql.org/message-id/CALDaNm3vJ8QaHYZtqk+KbRomGWPYkAzxvWzyfs_=gnSVmyvW4g@mail.gmail... Backpatch-through: 15 Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/f535af6131fd0eadd52140dc95d29cd4c9511cf2 Modified Files -------------- src/backend/commands/publicationcmds.c | 9 +++++---- src/test/regress/expected/publication.out | 10 ++++++++++ src/test/regress/sql/publication.sql | 8 ++++++++ 3 files changed, 23 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Report the correct table in publication duplicate-table errors @ 2026-11-25 14:44 Heikki Linnakangas <heikki.linnakangas@iki.fi> 0 siblings, 0 replies; 6+ messages in thread From: Heikki Linnakangas @ 2026-11-25 14:44 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Report the correct table in publication duplicate-table errors When a table is listed explicitly and also reached through its inheritance parent, CREATE/ALTER PUBLICATION reports "conflicting or redundant WHERE clauses" or "conflicting or redundant column lists". OpenTableList() reused the variable holding the explicitly named table for each child it opened. As a result, the error could report a different child (or the parent) instead of the table that was listed twice. For example, with parent p and children c1 and c2, "FOR TABLE c2, p WHERE (a > 0)" reported table "c1". Use a separate variable for the opened child and report the conflicting table in the error message. Author: Vignesh C <vignesh21@gmail.com> Discussion: https://www.postgresql.org/message-id/CALDaNm3vJ8QaHYZtqk+KbRomGWPYkAzxvWzyfs_=gnSVmyvW4g@mail.gmail... Backpatch-through: 15 Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/f574b2eb84cb09474e350f8f24149b062062c364 Modified Files -------------- src/backend/commands/publicationcmds.c | 9 +++++---- src/test/regress/expected/publication.out | 10 ++++++++++ src/test/regress/sql/publication.sql | 8 ++++++++ 3 files changed, 23 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Report the correct table in publication duplicate-table errors @ 2026-11-25 14:44 Heikki Linnakangas <heikki.linnakangas@iki.fi> 0 siblings, 0 replies; 6+ messages in thread From: Heikki Linnakangas @ 2026-11-25 14:44 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Report the correct table in publication duplicate-table errors When a table is listed explicitly and also reached through its inheritance parent, CREATE/ALTER PUBLICATION reports "conflicting or redundant WHERE clauses" or "conflicting or redundant column lists". OpenTableList() reused the variable holding the explicitly named table for each child it opened. As a result, the error could report a different child (or the parent) instead of the table that was listed twice. For example, with parent p and children c1 and c2, "FOR TABLE c2, p WHERE (a > 0)" reported table "c1". Use a separate variable for the opened child and report the conflicting table in the error message. Author: Vignesh C <vignesh21@gmail.com> Discussion: https://www.postgresql.org/message-id/CALDaNm3vJ8QaHYZtqk+KbRomGWPYkAzxvWzyfs_=gnSVmyvW4g@mail.gmail... Backpatch-through: 15 Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/0c202e673acd2b6dc76cafe7d7565d8c78e1111a Modified Files -------------- src/backend/commands/publicationcmds.c | 9 +++++---- src/test/regress/expected/publication.out | 10 ++++++++++ src/test/regress/sql/publication.sql | 8 ++++++++ 3 files changed, 23 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Report the correct table in publication duplicate-table errors @ 2026-11-25 14:44 Heikki Linnakangas <heikki.linnakangas@iki.fi> 0 siblings, 0 replies; 6+ messages in thread From: Heikki Linnakangas @ 2026-11-25 14:44 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Report the correct table in publication duplicate-table errors When a table is listed explicitly and also reached through its inheritance parent, CREATE/ALTER PUBLICATION reports "conflicting or redundant WHERE clauses" or "conflicting or redundant column lists". OpenTableList() reused the variable holding the explicitly named table for each child it opened. As a result, the error could report a different child (or the parent) instead of the table that was listed twice. For example, with parent p and children c1 and c2, "FOR TABLE c2, p WHERE (a > 0)" reported table "c1". Use a separate variable for the opened child and report the conflicting table in the error message. Author: Vignesh C <vignesh21@gmail.com> Discussion: https://www.postgresql.org/message-id/CALDaNm3vJ8QaHYZtqk+KbRomGWPYkAzxvWzyfs_=gnSVmyvW4g@mail.gmail... Backpatch-through: 15 Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/6d78d3bf3a6c97c7785dcd4161955a68825ad237 Modified Files -------------- src/backend/commands/publicationcmds.c | 9 +++++---- src/test/regress/expected/publication.out | 10 ++++++++++ src/test/regress/sql/publication.sql | 8 ++++++++ 3 files changed, 23 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Report the correct table in publication duplicate-table errors @ 2026-11-25 14:44 Heikki Linnakangas <heikki.linnakangas@iki.fi> 0 siblings, 0 replies; 6+ messages in thread From: Heikki Linnakangas @ 2026-11-25 14:44 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Report the correct table in publication duplicate-table errors When a table is listed explicitly and also reached through its inheritance parent, CREATE/ALTER PUBLICATION reports "conflicting or redundant WHERE clauses" or "conflicting or redundant column lists". OpenTableList() reused the variable holding the explicitly named table for each child it opened. As a result, the error could report a different child (or the parent) instead of the table that was listed twice. For example, with parent p and children c1 and c2, "FOR TABLE c2, p WHERE (a > 0)" reported table "c1". Use a separate variable for the opened child and report the conflicting table in the error message. Author: Vignesh C <vignesh21@gmail.com> Discussion: https://www.postgresql.org/message-id/CALDaNm3vJ8QaHYZtqk+KbRomGWPYkAzxvWzyfs_=gnSVmyvW4g@mail.gmail... Backpatch-through: 15 Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/06cbbf874b82bae89641a943feebc1e3c2bcd645 Modified Files -------------- src/backend/commands/publicationcmds.c | 9 +++++---- src/test/regress/expected/publication.out | 10 ++++++++++ src/test/regress/sql/publication.sql | 8 ++++++++ 3 files changed, 23 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2026-11-25 14:44 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-11-25 14:44 pgsql: Report the correct table in publication duplicate-table errors Heikki Linnakangas <heikki.linnakangas@iki.fi> 2026-11-25 14:44 pgsql: Report the correct table in publication duplicate-table errors Heikki Linnakangas <heikki.linnakangas@iki.fi> 2026-11-25 14:44 pgsql: Report the correct table in publication duplicate-table errors Heikki Linnakangas <heikki.linnakangas@iki.fi> 2026-11-25 14:44 pgsql: Report the correct table in publication duplicate-table errors Heikki Linnakangas <heikki.linnakangas@iki.fi> 2026-11-25 14:44 pgsql: Report the correct table in publication duplicate-table errors Heikki Linnakangas <heikki.linnakangas@iki.fi> 2026-11-25 14:44 pgsql: Report the correct table in publication duplicate-table errors Heikki Linnakangas <heikki.linnakangas@iki.fi>
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