Commit ef2b138
committed
Fix incorrect logic in plpgsql for cleanup after evaluation of non-simple
expressions. We need to deal with this when handling subscripts in an array
assignment, and also when catching an exception. In an Assert-enabled build
these omissions led to Assert failures, but I think in a normal build the
only consequence would be short-term memory leakage; which may explain why
this wasn't reported from the field long ago.
Back-patch to all supported versions. 7.4 doesn't have exceptions, but
otherwise these bugs go all the way back.
Heikki Linnakangas and Tom Lane1 parent 10c0565 commit ef2b138
File tree
3 files changed
+80
-2
lines changed- src
- pl/plpgsql/src
- test/regress
- expected
- sql
3 files changed
+80
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
1919 | 1919 | | |
1920 | 1920 | | |
1921 | 1921 | | |
| 1922 | + | |
| 1923 | + | |
| 1924 | + | |
1922 | 1925 | | |
1923 | 1926 | | |
1924 | 1927 | | |
| |||
2674 | 2677 | | |
2675 | 2678 | | |
2676 | 2679 | | |
| 2680 | + | |
| 2681 | + | |
| 2682 | + | |
| 2683 | + | |
2677 | 2684 | | |
2678 | 2685 | | |
2679 | 2686 | | |
| |||
2708 | 2715 | | |
2709 | 2716 | | |
2710 | 2717 | | |
| 2718 | + | |
2711 | 2719 | | |
2712 | 2720 | | |
2713 | 2721 | | |
| |||
2868 | 2876 | | |
2869 | 2877 | | |
2870 | 2878 | | |
| 2879 | + | |
| 2880 | + | |
| 2881 | + | |
| 2882 | + | |
| 2883 | + | |
| 2884 | + | |
| 2885 | + | |
| 2886 | + | |
| 2887 | + | |
| 2888 | + | |
2871 | 2889 | | |
2872 | 2890 | | |
2873 | 2891 | | |
| |||
2910 | 2928 | | |
2911 | 2929 | | |
2912 | 2930 | | |
| 2931 | + | |
| 2932 | + | |
| 2933 | + | |
| 2934 | + | |
| 2935 | + | |
| 2936 | + | |
| 2937 | + | |
| 2938 | + | |
| 2939 | + | |
| 2940 | + | |
| 2941 | + | |
2913 | 2942 | | |
2914 | 2943 | | |
| 2944 | + | |
| 2945 | + | |
| 2946 | + | |
| 2947 | + | |
2915 | 2948 | | |
2916 | 2949 | | |
2917 | 2950 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1788 | 1788 | | |
1789 | 1789 | | |
1790 | 1790 | | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
| 1811 | + | |
| 1812 | + | |
| 1813 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1603 | 1603 | | |
1604 | 1604 | | |
1605 | 1605 | | |
1606 | | - | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
0 commit comments