- Notifications
You must be signed in to change notification settings - Fork4.9k
Commitb200180
committed
Repair commits317aba7 et al for -DWRITE_READ_PARSE_PLAN_TREES.
Letting the rewriter keep RangeTblEntry.relid when expanding a viewRTE, without making the outfuncs/readfuncs changes that went alongwith that originally, is more problematic than I realized. It causesWRITE_READ_PARSE_PLAN_TREES testing to fail because outfuncs/readfuncsdon't think relid need be saved in an RTE_SUBQUERY RTE.There doesn't seem to be any other good route to fixing the whole-rowVar problem solved atf4e7756, so we just have to deal with theconsequences. We can make the eventually-produced plan tree safefor WRITE_READ_PARSE_PLAN_TREES by clearing the relid field at theend of planning, as was already being done for the functions field.(The functions field is not problematic here because our abuse of itis strictly local to the planner.) However, there is no nice fix forthe post-rewrite WRITE_READ_PARSE_PLAN_TREES test.The solution adopted here is to remove the post-rewrite test in theaffected branches. That's surely less than ideal, but a couple ofarguments can be made why it's not unacceptable. First, the behaviorof outfuncs/readfuncs for parsetrees in these branches is frozen nomatter what, because of catalog stability requirements. So we're nottesting anything that is going to change. Second, testingWRITE_READ_PARSE_PLAN_TREES at this particular time doesn't correspondto any direct system functionality requirement, neither rule storagenor plan transmission.Reported-by: Andres Freund <andres@anarazel.de>Author: Tom Lane <tgl@sss.pgh.pa.us>Reviewed-by: Dean Rasheed <dean.a.rasheed@gmail.com>Discussion:https://postgr.es/m/3518c50a-ab18-482f-b916-a37263622501@deepbluecap.comBackpatch-through: 13-151 parent39af32f commitb200180
File tree
4 files changed
+17
-43
lines changed- src
- backend
- optimizer/plan
- rewrite
- tcop
- include/nodes
4 files changed
+17
-43
lines changedLines changed: 9 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
438 | 438 |
| |
439 | 439 |
| |
440 | 440 |
| |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
441 | 450 |
| |
442 | 451 |
| |
443 | 452 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1828 | 1828 |
| |
1829 | 1829 |
| |
1830 | 1830 |
| |
1831 |
| - | |
1832 |
| - | |
| 1831 | + | |
| 1832 | + | |
1833 | 1833 |
| |
1834 | 1834 |
| |
1835 | 1835 |
| |
|
Lines changed: 4 additions & 39 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
803 | 803 |
| |
804 | 804 |
| |
805 | 805 |
| |
806 |
| - | |
807 |
| - | |
808 |
| - | |
809 |
| - | |
810 |
| - | |
811 |
| - | |
812 |
| - | |
813 |
| - | |
814 |
| - | |
815 |
| - | |
816 |
| - | |
817 |
| - | |
818 |
| - | |
819 |
| - | |
820 |
| - | |
821 |
| - | |
822 |
| - | |
823 |
| - | |
824 |
| - | |
825 |
| - | |
826 |
| - | |
827 |
| - | |
828 |
| - | |
829 |
| - | |
830 |
| - | |
831 |
| - | |
832 |
| - | |
833 |
| - | |
834 |
| - | |
835 |
| - | |
836 |
| - | |
837 |
| - | |
838 |
| - | |
839 |
| - | |
840 |
| - | |
841 |
| - | |
842 |
| - | |
843 |
| - | |
844 |
| - | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
845 | 810 |
| |
846 | 811 |
| |
847 | 812 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
985 | 985 |
| |
986 | 986 |
| |
987 | 987 |
| |
988 |
| - | |
989 |
| - | |
| 988 | + | |
| 989 | + | |
990 | 990 |
| |
991 | 991 |
| |
992 | 992 |
| |
|
0 commit comments
Comments
(0)