- Notifications
You must be signed in to change notification settings - Fork5
Commit4ec6581
committed
Fix handling of init_plans list in inheritance_planner().
Formerly we passed an empty list to each per-child-table invocation ofgrouping_planner, and then merged the results into the global list.However, that fails if there's a CTE attached to the statement, becausecreate_ctescan_plan uses the list to find the plan referenced by a CTEreference; so it was unable to find any CTEs attached to the outer UPDATEor DELETE. But there's no real reason not to use the same list throughoutthe process, and doing so is simpler and faster anyway.Per report from Josh Berkus of "could not find plan for CTE" failures.Back-patch to 9.1 where we added support for WITH attached to UPDATE orDELETE. Add some regression test cases, too.1 parent759d9d6 commit4ec6581
3 files changed
+87
-3
lines changedLines changed: 1 addition & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
835 | 835 |
| |
836 | 836 |
| |
837 | 837 |
| |
838 |
| - | |
839 |
| - | |
840 | 838 |
| |
841 | 839 |
| |
842 | 840 |
| |
| |||
883 | 881 |
| |
884 | 882 |
| |
885 | 883 |
| |
886 |
| - | |
| 884 | + | |
887 | 885 |
| |
888 | 886 |
| |
889 | 887 |
| |
|
Lines changed: 56 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1800 | 1800 |
| |
1801 | 1801 |
| |
1802 | 1802 |
| |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
| 1811 | + | |
| 1812 | + | |
| 1813 | + | |
| 1814 | + | |
| 1815 | + | |
| 1816 | + | |
| 1817 | + | |
| 1818 | + | |
| 1819 | + | |
| 1820 | + | |
| 1821 | + | |
| 1822 | + | |
| 1823 | + | |
| 1824 | + | |
| 1825 | + | |
| 1826 | + | |
| 1827 | + | |
| 1828 | + | |
| 1829 | + | |
| 1830 | + | |
| 1831 | + | |
| 1832 | + | |
| 1833 | + | |
| 1834 | + | |
| 1835 | + | |
| 1836 | + | |
| 1837 | + | |
| 1838 | + | |
| 1839 | + | |
| 1840 | + | |
| 1841 | + | |
| 1842 | + | |
| 1843 | + | |
| 1844 | + | |
| 1845 | + | |
| 1846 | + | |
| 1847 | + | |
| 1848 | + | |
| 1849 | + | |
| 1850 | + | |
| 1851 | + | |
| 1852 | + | |
| 1853 | + | |
| 1854 | + | |
| 1855 | + | |
| 1856 | + | |
| 1857 | + | |
| 1858 | + | |
1803 | 1859 |
| |
1804 | 1860 |
| |
1805 | 1861 |
| |
|
Lines changed: 30 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
761 | 761 |
| |
762 | 762 |
| |
763 | 763 |
| |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
764 | 794 |
| |
765 | 795 |
| |
766 | 796 |
| |
|
0 commit comments
Comments
(0)