pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Disallow changing an inherited column's type if not all parents 6+ messages / 1 participants [nested] [flat]
* pgsql: Disallow changing an inherited column's type if not all parents @ 2019-08-18 21:12 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2019-08-18 21:12 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Disallow changing an inherited column's type if not all parents changed. If a table inherits from multiple unrelated parents, we must disallow changing the type of a column inherited from multiple such parents, else it would be out of step with the other parents. However, it's possible for the column to ultimately be inherited from just one common ancestor, in which case a change starting from that ancestor should still be allowed. (I would not be excited about preserving that option, were it not that we have regression test cases exercising it already ...) It's slightly annoying that this patch looks different from the logic with the same end goal in renameatt(), and more annoying that it requires an extra syscache lookup to make the test. However, the recursion logic is quite different in the two functions, and a back-patched bug fix is no place to be trying to unify them. Per report from Manuel Rigger. Back-patch to 9.5. The bug exists in 9.4 too (and doubtless much further back); but the way the recursion is done in 9.4 is a good bit different, so that substantial refactoring would be needed to fix it in 9.4. I'm disinclined to do that, or risk introducing new bugs, for a bug that has escaped notice for this long. Discussion: https://postgr.es/m/CA+u7OA4qogDv9rz1HAb-ADxttXYPqQdUdPY_yd4kCzywNxRQXA@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/4d4c66addfd4da51b0e4be456d6109bea4539fac Modified Files -------------- src/backend/commands/tablecmds.c | 45 ++++++++++++++++++++++++++++++----- src/test/regress/expected/inherit.out | 10 ++++++++ src/test/regress/sql/inherit.sql | 9 +++++++ 3 files changed, 58 insertions(+), 6 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Disallow changing an inherited column's type if not all parents @ 2019-08-18 21:12 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2019-08-18 21:12 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Disallow changing an inherited column's type if not all parents changed. If a table inherits from multiple unrelated parents, we must disallow changing the type of a column inherited from multiple such parents, else it would be out of step with the other parents. However, it's possible for the column to ultimately be inherited from just one common ancestor, in which case a change starting from that ancestor should still be allowed. (I would not be excited about preserving that option, were it not that we have regression test cases exercising it already ...) It's slightly annoying that this patch looks different from the logic with the same end goal in renameatt(), and more annoying that it requires an extra syscache lookup to make the test. However, the recursion logic is quite different in the two functions, and a back-patched bug fix is no place to be trying to unify them. Per report from Manuel Rigger. Back-patch to 9.5. The bug exists in 9.4 too (and doubtless much further back); but the way the recursion is done in 9.4 is a good bit different, so that substantial refactoring would be needed to fix it in 9.4. I'm disinclined to do that, or risk introducing new bugs, for a bug that has escaped notice for this long. Discussion: https://postgr.es/m/CA+u7OA4qogDv9rz1HAb-ADxttXYPqQdUdPY_yd4kCzywNxRQXA@mail.gmail.com Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/328c3f6f96a4d7cdc368264a97d03c9b75ad54ea Modified Files -------------- src/backend/commands/tablecmds.c | 45 ++++++++++++++++++++++++++++++----- src/test/regress/expected/inherit.out | 10 ++++++++ src/test/regress/sql/inherit.sql | 9 +++++++ 3 files changed, 58 insertions(+), 6 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Disallow changing an inherited column's type if not all parents @ 2019-08-18 21:12 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2019-08-18 21:12 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Disallow changing an inherited column's type if not all parents changed. If a table inherits from multiple unrelated parents, we must disallow changing the type of a column inherited from multiple such parents, else it would be out of step with the other parents. However, it's possible for the column to ultimately be inherited from just one common ancestor, in which case a change starting from that ancestor should still be allowed. (I would not be excited about preserving that option, were it not that we have regression test cases exercising it already ...) It's slightly annoying that this patch looks different from the logic with the same end goal in renameatt(), and more annoying that it requires an extra syscache lookup to make the test. However, the recursion logic is quite different in the two functions, and a back-patched bug fix is no place to be trying to unify them. Per report from Manuel Rigger. Back-patch to 9.5. The bug exists in 9.4 too (and doubtless much further back); but the way the recursion is done in 9.4 is a good bit different, so that substantial refactoring would be needed to fix it in 9.4. I'm disinclined to do that, or risk introducing new bugs, for a bug that has escaped notice for this long. Discussion: https://postgr.es/m/CA+u7OA4qogDv9rz1HAb-ADxttXYPqQdUdPY_yd4kCzywNxRQXA@mail.gmail.com Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/909efc4498a071df1198677bc73366f0e29492ce Modified Files -------------- src/backend/commands/tablecmds.c | 45 ++++++++++++++++++++++++++++++----- src/test/regress/expected/inherit.out | 10 ++++++++ src/test/regress/sql/inherit.sql | 9 +++++++ 3 files changed, 58 insertions(+), 6 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Disallow changing an inherited column's type if not all parents @ 2019-08-18 21:12 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2019-08-18 21:12 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Disallow changing an inherited column's type if not all parents changed. If a table inherits from multiple unrelated parents, we must disallow changing the type of a column inherited from multiple such parents, else it would be out of step with the other parents. However, it's possible for the column to ultimately be inherited from just one common ancestor, in which case a change starting from that ancestor should still be allowed. (I would not be excited about preserving that option, were it not that we have regression test cases exercising it already ...) It's slightly annoying that this patch looks different from the logic with the same end goal in renameatt(), and more annoying that it requires an extra syscache lookup to make the test. However, the recursion logic is quite different in the two functions, and a back-patched bug fix is no place to be trying to unify them. Per report from Manuel Rigger. Back-patch to 9.5. The bug exists in 9.4 too (and doubtless much further back); but the way the recursion is done in 9.4 is a good bit different, so that substantial refactoring would be needed to fix it in 9.4. I'm disinclined to do that, or risk introducing new bugs, for a bug that has escaped notice for this long. Discussion: https://postgr.es/m/CA+u7OA4qogDv9rz1HAb-ADxttXYPqQdUdPY_yd4kCzywNxRQXA@mail.gmail.com Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/451432214f1a9c59e59dbbcdd91e92bb69e6cd03 Modified Files -------------- src/backend/commands/tablecmds.c | 45 ++++++++++++++++++++++++++++++----- src/test/regress/expected/inherit.out | 10 ++++++++ src/test/regress/sql/inherit.sql | 9 +++++++ 3 files changed, 58 insertions(+), 6 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Disallow changing an inherited column's type if not all parents @ 2019-08-18 21:12 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2019-08-18 21:12 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Disallow changing an inherited column's type if not all parents changed. If a table inherits from multiple unrelated parents, we must disallow changing the type of a column inherited from multiple such parents, else it would be out of step with the other parents. However, it's possible for the column to ultimately be inherited from just one common ancestor, in which case a change starting from that ancestor should still be allowed. (I would not be excited about preserving that option, were it not that we have regression test cases exercising it already ...) It's slightly annoying that this patch looks different from the logic with the same end goal in renameatt(), and more annoying that it requires an extra syscache lookup to make the test. However, the recursion logic is quite different in the two functions, and a back-patched bug fix is no place to be trying to unify them. Per report from Manuel Rigger. Back-patch to 9.5. The bug exists in 9.4 too (and doubtless much further back); but the way the recursion is done in 9.4 is a good bit different, so that substantial refactoring would be needed to fix it in 9.4. I'm disinclined to do that, or risk introducing new bugs, for a bug that has escaped notice for this long. Discussion: https://postgr.es/m/CA+u7OA4qogDv9rz1HAb-ADxttXYPqQdUdPY_yd4kCzywNxRQXA@mail.gmail.com Branch ------ REL9_6_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/3442235f2a8d902fb3f8664dd71dfaa258ba656a Modified Files -------------- src/backend/commands/tablecmds.c | 45 ++++++++++++++++++++++++++++++----- src/test/regress/expected/inherit.out | 10 ++++++++ src/test/regress/sql/inherit.sql | 9 +++++++ 3 files changed, 58 insertions(+), 6 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Disallow changing an inherited column's type if not all parents @ 2019-08-18 21:12 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2019-08-18 21:12 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Disallow changing an inherited column's type if not all parents changed. If a table inherits from multiple unrelated parents, we must disallow changing the type of a column inherited from multiple such parents, else it would be out of step with the other parents. However, it's possible for the column to ultimately be inherited from just one common ancestor, in which case a change starting from that ancestor should still be allowed. (I would not be excited about preserving that option, were it not that we have regression test cases exercising it already ...) It's slightly annoying that this patch looks different from the logic with the same end goal in renameatt(), and more annoying that it requires an extra syscache lookup to make the test. However, the recursion logic is quite different in the two functions, and a back-patched bug fix is no place to be trying to unify them. Per report from Manuel Rigger. Back-patch to 9.5. The bug exists in 9.4 too (and doubtless much further back); but the way the recursion is done in 9.4 is a good bit different, so that substantial refactoring would be needed to fix it in 9.4. I'm disinclined to do that, or risk introducing new bugs, for a bug that has escaped notice for this long. Discussion: https://postgr.es/m/CA+u7OA4qogDv9rz1HAb-ADxttXYPqQdUdPY_yd4kCzywNxRQXA@mail.gmail.com Branch ------ REL9_5_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/c511d367aab0ef7938519a19b4c826cf6db7a29e Modified Files -------------- src/backend/commands/tablecmds.c | 45 ++++++++++++++++++++++++++++++----- src/test/regress/expected/inherit.out | 10 ++++++++ src/test/regress/sql/inherit.sql | 9 +++++++ 3 files changed, 58 insertions(+), 6 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2019-08-18 21:12 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2019-08-18 21:12 pgsql: Disallow changing an inherited column's type if not all parents Tom Lane <tgl@sss.pgh.pa.us> 2019-08-18 21:12 pgsql: Disallow changing an inherited column's type if not all parents Tom Lane <tgl@sss.pgh.pa.us> 2019-08-18 21:12 pgsql: Disallow changing an inherited column's type if not all parents Tom Lane <tgl@sss.pgh.pa.us> 2019-08-18 21:12 pgsql: Disallow changing an inherited column's type if not all parents Tom Lane <tgl@sss.pgh.pa.us> 2019-08-18 21:12 pgsql: Disallow changing an inherited column's type if not all parents Tom Lane <tgl@sss.pgh.pa.us> 2019-08-18 21:12 pgsql: Disallow changing an inherited column's type if not all parents Tom Lane <tgl@sss.pgh.pa.us>
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