forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit4d4c66a
committed
Disallow changing an inherited column's type if not all parents changed.
If a table inherits from multiple unrelated parents, we must disallowchanging the type of a column inherited from multiple such parents, elseit would be out of step with the other parents. However, it's possiblefor the column to ultimately be inherited from just one common ancestor,in which case a change starting from that ancestor should still beallowed. (I would not be excited about preserving that option, wereit not that we have regression test cases exercising it already ...)It's slightly annoying that this patch looks different from the logicwith the same end goal in renameatt(), and more annoying that itrequires an extra syscache lookup to make the test. However, therecursion logic is quite different in the two functions, and aback-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 in9.4 too (and doubtless much further back); but the way the recursionis done in 9.4 is a good bit different, so that substantial refactoringwould be needed to fix it in 9.4. I'm disinclined to do that, or riskintroducing new bugs, for a bug that has escaped notice for this long.Discussion:https://postgr.es/m/CA+u7OA4qogDv9rz1HAb-ADxttXYPqQdUdPY_yd4kCzywNxRQXA@mail.gmail.com1 parent7e78c87 commit4d4c66a
File tree
3 files changed
+58
-6
lines changed- src
- backend/commands
- test/regress
- expected
- sql
3 files changed
+58
-6
lines changedLines changed: 39 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10279 | 10279 |
| |
10280 | 10280 |
| |
10281 | 10281 |
| |
10282 |
| - | |
| 10282 | + | |
| 10283 | + | |
| 10284 | + | |
| 10285 | + | |
| 10286 | + | |
10283 | 10287 |
| |
10284 | 10288 |
| |
10285 | 10289 |
| |
| |||
10405 | 10409 |
| |
10406 | 10410 |
| |
10407 | 10411 |
| |
10408 |
| - | |
10409 |
| - | |
| 10412 | + | |
| 10413 | + | |
| 10414 | + | |
| 10415 | + | |
10410 | 10416 |
| |
10411 |
| - | |
| 10417 | + | |
| 10418 | + | |
10412 | 10419 |
| |
10413 | 10420 |
| |
10414 | 10421 |
| |
10415 | 10422 |
| |
10416 | 10423 |
| |
10417 | 10424 |
| |
10418 |
| - | |
| 10425 | + | |
10419 | 10426 |
| |
10420 |
| - | |
| 10427 | + | |
| 10428 | + | |
10421 | 10429 |
| |
| 10430 | + | |
| 10431 | + | |
10422 | 10432 |
| |
10423 | 10433 |
| |
10424 | 10434 |
| |
| |||
10427 | 10437 |
| |
10428 | 10438 |
| |
10429 | 10439 |
| |
| 10440 | + | |
| 10441 | + | |
| 10442 | + | |
| 10443 | + | |
| 10444 | + | |
| 10445 | + | |
| 10446 | + | |
| 10447 | + | |
| 10448 | + | |
| 10449 | + | |
| 10450 | + | |
| 10451 | + | |
| 10452 | + | |
| 10453 | + | |
| 10454 | + | |
| 10455 | + | |
| 10456 | + | |
| 10457 | + | |
| 10458 | + | |
| 10459 | + | |
| 10460 | + | |
| 10461 | + | |
| 10462 | + | |
10430 | 10463 |
| |
10431 | 10464 |
| |
10432 | 10465 |
| |
|
Lines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
723 | 723 |
| |
724 | 724 |
| |
725 | 725 |
| |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
726 | 736 |
| |
727 | 737 |
| |
728 | 738 |
| |
|
Lines changed: 9 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
208 | 208 |
| |
209 | 209 |
| |
210 | 210 |
| |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
211 | 220 |
| |
212 | 221 |
| |
213 | 222 |
| |
|
0 commit comments
Comments
(0)