Commit 678e0d9
committed
Avoid an Assert failure in deconstruct_array() by making get_attstatsslot()
use the actual element type of the array it's disassembling, rather than
trusting the type OID passed in by its caller. This is needed because
sometimes the planner passes in a type OID that's only binary-compatible
with the target column's type, rather than being an exact match. Per an
example from Bernd Helmle.
Possibly we should refactor get_attstatsslot/free_attstatsslot to not expect
the caller to supply type ID data at all, but for now I'll just do the
minimum-change fix.
Back-patch to 7.4. Bernd's test case only crashes back to 8.0, but since
these subroutines are the same in 7.4, I suspect there may be variant
cases that would crash 7.4 as well.1 parent 1cf269c commit 678e0d9
1 file changed
+17
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
1796 | 1796 | | |
1797 | 1797 | | |
1798 | 1798 | | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
1799 | 1803 | | |
1800 | 1804 | | |
1801 | 1805 | | |
| |||
1810 | 1814 | | |
1811 | 1815 | | |
1812 | 1816 | | |
| 1817 | + | |
1813 | 1818 | | |
1814 | 1819 | | |
1815 | 1820 | | |
| |||
1832 | 1837 | | |
1833 | 1838 | | |
1834 | 1839 | | |
1835 | | - | |
| 1840 | + | |
| 1841 | + | |
| 1842 | + | |
| 1843 | + | |
| 1844 | + | |
| 1845 | + | |
| 1846 | + | |
| 1847 | + | |
1836 | 1848 | | |
1837 | | - | |
| 1849 | + | |
1838 | 1850 | | |
1839 | 1851 | | |
1840 | | - | |
| 1852 | + | |
1841 | 1853 | | |
1842 | 1854 | | |
1843 | 1855 | | |
1844 | 1856 | | |
1845 | | - | |
| 1857 | + | |
1846 | 1858 | | |
1847 | 1859 | | |
1848 | 1860 | | |
| |||
0 commit comments