forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit178f2d5
committed
Include result relation info in direct modify ForeignScan nodes.
FDWs that can perform an UPDATE/DELETE remotely using the "direct modify"set of APIs need to access the ResultRelInfo of the target table. That'scurrently available in EState.es_result_relation_info, but the nextcommit will remove that field.This commit adds a new resultRelation field in ForeignScan, to store thetarget relation's RT index, and the corresponding ResultRelInfo inForeignScanState. The FDW's PlanDirectModify callback is expected to set'resultRelation' along with 'operation'. The core code doesn't need themfor anything, they are for the convenience of FDW's Begin- andIterateDirectModify callbacks.Authors: Amit Langote, Etsuro FujitaDiscussion:https://www.postgresql.org/message-id/CA%2BHiwqGEmiib8FLiHMhKB%2BCH5dRgHSLc5N5wnvc4kym%2BZYpQEQ%40mail.gmail.com1 parent39b4a95 commit178f2d5
File tree
10 files changed
+45
-13
lines changed- contrib/postgres_fdw
- doc/src/sgml
- src
- backend
- executor
- nodes
- optimizer/plan
- include/nodes
10 files changed
+45
-13
lines changedLines changed: 9 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
451 | 451 |
| |
452 | 452 |
| |
453 | 453 |
| |
| 454 | + | |
454 | 455 |
| |
455 | 456 |
| |
456 | 457 |
| |
| |||
2287 | 2288 |
| |
2288 | 2289 |
| |
2289 | 2290 |
| |
2290 |
| - | |
| 2291 | + | |
2291 | 2292 |
| |
2292 | 2293 |
| |
| 2294 | + | |
2293 | 2295 |
| |
2294 | 2296 |
| |
2295 | 2297 |
| |
| |||
2355 | 2357 |
| |
2356 | 2358 |
| |
2357 | 2359 |
| |
2358 |
| - | |
| 2360 | + | |
2359 | 2361 |
| |
2360 | 2362 |
| |
2361 | 2363 |
| |
| |||
2450 | 2452 |
| |
2451 | 2453 |
| |
2452 | 2454 |
| |
2453 |
| - | |
| 2455 | + | |
2454 | 2456 |
| |
2455 | 2457 |
| |
2456 | 2458 |
| |
| |||
4086 | 4088 |
| |
4087 | 4089 |
| |
4088 | 4090 |
| |
4089 |
| - | |
| 4091 | + | |
4090 | 4092 |
| |
4091 | 4093 |
| |
4092 | 4094 |
| |
| |||
4141 | 4143 |
| |
4142 | 4144 |
| |
4143 | 4145 |
| |
4144 |
| - | |
| 4146 | + | |
4145 | 4147 |
| |
4146 | 4148 |
| |
4147 | 4149 |
| |
| |||
4230 | 4232 |
| |
4231 | 4233 |
| |
4232 | 4234 |
| |
| 4235 | + | |
4233 | 4236 |
| |
4234 | 4237 |
| |
4235 | 4238 |
| |
4236 |
| - | |
4237 | 4239 |
| |
4238 | 4240 |
| |
4239 | 4241 |
| |
| |||
4245 | 4247 |
| |
4246 | 4248 |
| |
4247 | 4249 |
| |
4248 |
| - | |
| 4250 | + | |
4249 | 4251 |
| |
4250 | 4252 |
| |
4251 | 4253 |
| |
|
Lines changed: 9 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
861 | 861 |
| |
862 | 862 |
| |
863 | 863 |
| |
864 |
| - | |
865 |
| - | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
866 | 868 |
| |
867 | 869 |
| |
868 |
| - | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
869 | 873 |
| |
870 | 874 |
| |
871 | 875 |
| |
| |||
925 | 929 |
| |
926 | 930 |
| |
927 | 931 |
| |
928 |
| - | |
929 |
| - | |
930 |
| - | |
| 932 | + | |
| 933 | + | |
931 | 934 |
| |
932 | 935 |
| |
933 | 936 |
| |
|
Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
215 | 215 |
| |
216 | 216 |
| |
217 | 217 |
| |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
218 | 225 |
| |
219 | 226 |
| |
220 | 227 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
758 | 758 |
| |
759 | 759 |
| |
760 | 760 |
| |
| 761 | + | |
761 | 762 |
| |
762 | 763 |
| |
763 | 764 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
695 | 695 |
| |
696 | 696 |
| |
697 | 697 |
| |
| 698 | + | |
698 | 699 |
| |
699 | 700 |
| |
700 | 701 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2014 | 2014 |
| |
2015 | 2015 |
| |
2016 | 2016 |
| |
| 2017 | + | |
2017 | 2018 |
| |
2018 | 2019 |
| |
2019 | 2020 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5530 | 5530 |
| |
5531 | 5531 |
| |
5532 | 5532 |
| |
| 5533 | + | |
| 5534 | + | |
5533 | 5535 |
| |
| 5536 | + | |
| 5537 | + | |
5534 | 5538 |
| |
5535 | 5539 |
| |
5536 | 5540 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1310 | 1310 |
| |
1311 | 1311 |
| |
1312 | 1312 |
| |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
1313 | 1317 |
| |
1314 | 1318 |
| |
1315 | 1319 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1777 | 1777 |
| |
1778 | 1778 |
| |
1779 | 1779 |
| |
| 1780 | + | |
1780 | 1781 |
| |
1781 | 1782 |
| |
1782 | 1783 |
| |
|
Lines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
599 | 599 |
| |
600 | 600 |
| |
601 | 601 |
| |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
602 | 609 |
| |
603 | 610 |
| |
604 | 611 |
| |
605 | 612 |
| |
606 | 613 |
| |
607 | 614 |
| |
| 615 | + | |
608 | 616 |
| |
609 | 617 |
| |
610 | 618 |
| |
|
0 commit comments
Comments
(0)