pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix for dropped columns in a partitioned table's default partiti 2+ messages / 1 participants [nested] [flat]
* pgsql: Fix for dropped columns in a partitioned table's default partiti @ 2019-06-28 18:52 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 2+ messages in thread From: Alvaro Herrera @ 2019-06-28 18:52 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix for dropped columns in a partitioned table's default partition We forgot to map column numbers to/from the default partition for various operations, leading to valid cases failing with spurious errors, such as ERROR: attribute N of type some_partition has been dropped It was also possible that the search for conflicting rows in the default partition when attaching another partition would fail to detect some. Secondarily, it was also possible that such a search should be skipped (because the constraint was implied) but wasn't. Fix all this by mapping column numbers when necessary. Reported by: Daniel Wilches Author: Amit Langote Discussion: https://postgr.es/m/15873-8c61945d6b3ef87c@postgresql.org Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/23cccb17fe0bbb5df86780da5c346cc060c21421 Modified Files -------------- src/backend/commands/tablecmds.c | 7 +++++++ src/backend/partitioning/partbounds.c | 24 +++++++++++++++++++----- src/test/regress/expected/alter_table.out | 9 ++++++++- src/test/regress/expected/create_table.out | 14 ++++++++++++++ src/test/regress/sql/alter_table.sql | 9 ++++++++- src/test/regress/sql/create_table.sql | 14 ++++++++++++++ 6 files changed, 70 insertions(+), 7 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Fix for dropped columns in a partitioned table's default partiti @ 2019-06-28 18:52 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 2+ messages in thread From: Alvaro Herrera @ 2019-06-28 18:52 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix for dropped columns in a partitioned table's default partition We forgot to map column numbers to/from the default partition for various operations, leading to valid cases failing with spurious errors, such as ERROR: attribute N of type some_partition has been dropped It was also possible that the search for conflicting rows in the default partition when attaching another partition would fail to detect some. Secondarily, it was also possible that such a search should be skipped (because the constraint was implied) but wasn't. Fix all this by mapping column numbers when necessary. Reported by: Daniel Wilches Author: Amit Langote Discussion: https://postgr.es/m/15873-8c61945d6b3ef87c@postgresql.org Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/43085a4f693e35d674a9965c484e4e87f18f6d29 Modified Files -------------- src/backend/commands/tablecmds.c | 7 +++++++ src/backend/partitioning/partbounds.c | 24 +++++++++++++++++++----- src/test/regress/expected/alter_table.out | 9 ++++++++- src/test/regress/sql/alter_table.sql | 9 ++++++++- 4 files changed, 42 insertions(+), 7 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2019-06-28 18:52 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2019-06-28 18:52 pgsql: Fix for dropped columns in a partitioned table's default partiti Alvaro Herrera <alvherre@alvh.no-ip.org> 2019-06-28 18:52 pgsql: Fix for dropped columns in a partitioned table's default partiti Alvaro Herrera <alvherre@alvh.no-ip.org>
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