Commit 07871d4
committed
Remove bogus Assert, add some regression test cases showing why.
Commit 77ec5af added an assertion to enforce_generic_type_consistency
that boils down to "if the function result is polymorphic, there must be
at least one polymorphic argument". This should be true for user-created
functions, but there are built-in functions for which it's not true, as
pointed out by Jaime Casanova. Hence, go back to the old behavior of
leaving the return type alone. There's only a limited amount of stuff
you can do with such a function result, but it does work to some extent;
add some regression test cases to ensure we don't break that again.
Discussion: https://postgr.es/m/CAJGNTeMbhtsCUZgJJ8h8XxAJbK7U2ipsX8wkHRtZRz-NieT8RA@mail.gmail.com1 parent c6b9204 commit 07871d4
File tree
3 files changed
+30
-9
lines changed- src
- backend/parser
- test/regress
- expected
- sql
3 files changed
+30
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1813 | 1813 | | |
1814 | 1814 | | |
1815 | 1815 | | |
1816 | | - | |
| 1816 | + | |
| 1817 | + | |
1817 | 1818 | | |
1818 | 1819 | | |
1819 | 1820 | | |
1820 | 1821 | | |
1821 | 1822 | | |
1822 | 1823 | | |
1823 | 1824 | | |
1824 | | - | |
1825 | | - | |
| 1825 | + | |
| 1826 | + | |
1826 | 1827 | | |
1827 | | - | |
1828 | | - | |
| 1828 | + | |
| 1829 | + | |
1829 | 1830 | | |
1830 | 1831 | | |
1831 | 1832 | | |
| |||
1869 | 1870 | | |
1870 | 1871 | | |
1871 | 1872 | | |
| 1873 | + | |
| 1874 | + | |
| 1875 | + | |
| 1876 | + | |
| 1877 | + | |
1872 | 1878 | | |
1873 | 1879 | | |
1874 | 1880 | | |
| |||
2042 | 2048 | | |
2043 | 2049 | | |
2044 | 2050 | | |
2045 | | - | |
| 2051 | + | |
2046 | 2052 | | |
2047 | 2053 | | |
2048 | | - | |
2049 | | - | |
2050 | 2054 | | |
2051 | | - | |
2052 | 2055 | | |
2053 | 2056 | | |
2054 | 2057 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
852 | 852 | | |
853 | 853 | | |
854 | 854 | | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
855 | 868 | | |
856 | 869 | | |
857 | 870 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
577 | 577 | | |
578 | 578 | | |
579 | 579 | | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
580 | 585 | | |
581 | 586 | | |
582 | 587 | | |
| |||
0 commit comments