forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd543170
committed
Don't split up SRFs when choosing to postpone SELECT output expressions.
In commit9118d03 we taught the planner to postpone evaluation ofset-returning functions in a SELECT's targetlist until after any sort doneto satisfy ORDER BY. However, if we postpone some SRFs this way whileothers do not get postponed (because they're sort or group key columns)we will break the traditional behavior by which all SRFs in the tlist runin-step during ExecTargetList(), so that you get the least common multipleof their periods not the product. Fix make_sort_input_target() so it willnot split up SRF evaluation in such cases.There is still a hazard of similar odd behavior if there's a SRF in agrouping column and another one that isn't, but that was true beforeand we're just trying to preserve bug-compatibility with the traditionalbehavior. This whole area is overdue to be rethought and reimplemented,but we'll try to avoid changing behavior until then.Per report from Regina Obe.1 parent7caaeaf commitd543170
3 files changed
+86
-13
lines changedLines changed: 35 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4615 | 4615 |
| |
4616 | 4616 |
| |
4617 | 4617 |
| |
4618 |
| - | |
4619 |
| - | |
4620 |
| - | |
4621 |
| - | |
4622 |
| - | |
| 4618 | + | |
| 4619 | + | |
| 4620 | + | |
| 4621 | + | |
| 4622 | + | |
| 4623 | + | |
| 4624 | + | |
| 4625 | + | |
| 4626 | + | |
| 4627 | + | |
4623 | 4628 |
| |
4624 | 4629 |
| |
4625 | 4630 |
| |
| |||
4664 | 4669 |
| |
4665 | 4670 |
| |
4666 | 4671 |
| |
| 4672 | + | |
4667 | 4673 |
| |
4668 | 4674 |
| |
4669 | 4675 |
| |
4670 | 4676 |
| |
| 4677 | + | |
| 4678 | + | |
4671 | 4679 |
| |
4672 | 4680 |
| |
4673 | 4681 |
| |
| |||
4680 | 4688 |
| |
4681 | 4689 |
| |
4682 | 4690 |
| |
| 4691 | + | |
4683 | 4692 |
| |
4684 |
| - | |
| 4693 | + | |
4685 | 4694 |
| |
4686 | 4695 |
| |
4687 | 4696 |
| |
| |||
4699 | 4708 |
| |
4700 | 4709 |
| |
4701 | 4710 |
| |
4702 |
| - | |
4703 |
| - | |
4704 |
| - | |
| 4711 | + | |
| 4712 | + | |
4705 | 4713 |
| |
4706 | 4714 |
| |
4707 | 4715 |
| |
4708 |
| - | |
| 4716 | + | |
| 4717 | + | |
4709 | 4718 |
| |
4710 | 4719 |
| |
4711 | 4720 |
| |
4712 | 4721 |
| |
| 4722 | + | |
4713 | 4723 |
| |
4714 | 4724 |
| |
4715 | 4725 |
| |
| |||
4736 | 4746 |
| |
4737 | 4747 |
| |
4738 | 4748 |
| |
| 4749 | + | |
| 4750 | + | |
| 4751 | + | |
| 4752 | + | |
| 4753 | + | |
| 4754 | + | |
| 4755 | + | |
4739 | 4756 |
| |
4740 | 4757 |
| |
4741 | 4758 |
| |
4742 | 4759 |
| |
| 4760 | + | |
| 4761 | + | |
| 4762 | + | |
| 4763 | + | |
| 4764 | + | |
4743 | 4765 |
| |
4744 | 4766 |
| |
4745 | 4767 |
| |
4746 |
| - | |
| 4768 | + | |
4747 | 4769 |
| |
4748 | 4770 |
| |
4749 | 4771 |
| |
| |||
4754 | 4776 |
| |
4755 | 4777 |
| |
4756 | 4778 |
| |
4757 |
| - | |
| 4779 | + | |
4758 | 4780 |
| |
4759 | 4781 |
| |
4760 | 4782 |
| |
| |||
4769 | 4791 |
| |
4770 | 4792 |
| |
4771 | 4793 |
| |
4772 |
| - | |
| 4794 | + | |
4773 | 4795 |
| |
4774 | 4796 |
| |
4775 | 4797 |
| |
|
Lines changed: 38 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
258 | 258 |
| |
259 | 259 |
| |
260 | 260 |
| |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + |
Lines changed: 13 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
78 | 78 |
| |
79 | 79 |
| |
80 | 80 |
| |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + |
0 commit comments
Comments
(0)