Commit deac948
committed
Insert conditional SPI_push/SPI_pop calls into InputFunctionCall,
OutputFunctionCall, and friends. This allows SPI-using functions to invoke
datatype I/O without concern for the possibility that a SPI-using function
will be called (which could be either the I/O function itself, or a function
used in a domain check constraint). It's a tad ugly, but not nearly as ugly
as what'd be needed to make this work via retail insertion of push/pop
operations in all the PLs.
This reverts my patch of 2007-01-30 that inserted some retail SPI_push/pop
calls into plpgsql; that approach only fixed plpgsql, and not any other PLs.
But the other PLs have the issue too, as illustrated by a recent gripe from
Christian Schröder.
Back-patch to 8.2, which is as far back as this solution will work. It's
also as far back as we need to worry about the domain-constraint case, since
earlier versions did not attempt to check domain constraints within datatype
input. I'm not aware of any old I/O functions that use SPI themselves, so
this should be sufficient for a back-patch.1 parent 6b88393 commit deac948
4 files changed
+77
-40
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
307 | 332 | | |
308 | 333 | | |
309 | 334 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
1846 | 1847 | | |
1847 | 1848 | | |
1848 | 1849 | | |
| 1850 | + | |
| 1851 | + | |
| 1852 | + | |
| 1853 | + | |
| 1854 | + | |
| 1855 | + | |
1849 | 1856 | | |
1850 | 1857 | | |
1851 | 1858 | | |
1852 | 1859 | | |
1853 | 1860 | | |
1854 | 1861 | | |
| 1862 | + | |
1855 | 1863 | | |
1856 | 1864 | | |
1857 | 1865 | | |
1858 | 1866 | | |
| 1867 | + | |
| 1868 | + | |
1859 | 1869 | | |
1860 | 1870 | | |
1861 | 1871 | | |
| |||
1881 | 1891 | | |
1882 | 1892 | | |
1883 | 1893 | | |
| 1894 | + | |
| 1895 | + | |
1884 | 1896 | | |
1885 | 1897 | | |
1886 | 1898 | | |
| |||
1889 | 1901 | | |
1890 | 1902 | | |
1891 | 1903 | | |
1892 | | - | |
1893 | | - | |
| 1904 | + | |
| 1905 | + | |
1894 | 1906 | | |
1895 | 1907 | | |
1896 | 1908 | | |
1897 | 1909 | | |
1898 | | - | |
| 1910 | + | |
| 1911 | + | |
| 1912 | + | |
| 1913 | + | |
| 1914 | + | |
| 1915 | + | |
| 1916 | + | |
| 1917 | + | |
| 1918 | + | |
| 1919 | + | |
1899 | 1920 | | |
1900 | 1921 | | |
1901 | 1922 | | |
| |||
1904 | 1925 | | |
1905 | 1926 | | |
1906 | 1927 | | |
1907 | | - | |
| 1928 | + | |
| 1929 | + | |
1908 | 1930 | | |
1909 | 1931 | | |
1910 | 1932 | | |
1911 | 1933 | | |
1912 | 1934 | | |
1913 | 1935 | | |
1914 | 1936 | | |
| 1937 | + | |
1915 | 1938 | | |
1916 | 1939 | | |
1917 | 1940 | | |
1918 | 1941 | | |
| 1942 | + | |
| 1943 | + | |
1919 | 1944 | | |
1920 | 1945 | | |
1921 | 1946 | | |
| |||
1941 | 1966 | | |
1942 | 1967 | | |
1943 | 1968 | | |
| 1969 | + | |
| 1970 | + | |
1944 | 1971 | | |
1945 | 1972 | | |
1946 | 1973 | | |
| |||
1949 | 1976 | | |
1950 | 1977 | | |
1951 | 1978 | | |
1952 | | - | |
1953 | | - | |
1954 | | - | |
| 1979 | + | |
| 1980 | + | |
| 1981 | + | |
| 1982 | + | |
1955 | 1983 | | |
1956 | 1984 | | |
1957 | 1985 | | |
1958 | 1986 | | |
1959 | | - | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
| 1991 | + | |
| 1992 | + | |
| 1993 | + | |
| 1994 | + | |
| 1995 | + | |
| 1996 | + | |
1960 | 1997 | | |
1961 | 1998 | | |
1962 | 1999 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
4690 | 4690 | | |
4691 | 4691 | | |
4692 | 4692 | | |
4693 | | - | |
4694 | 4693 | | |
4695 | 4694 | | |
4696 | 4695 | | |
4697 | 4696 | | |
4698 | | - | |
4699 | | - | |
4700 | | - | |
4701 | | - | |
4702 | | - | |
4703 | | - | |
4704 | | - | |
4705 | | - | |
4706 | | - | |
4707 | | - | |
4708 | | - | |
4709 | | - | |
4710 | | - | |
4711 | | - | |
4712 | | - | |
4713 | | - | |
| 4697 | + | |
4714 | 4698 | | |
4715 | 4699 | | |
4716 | 4700 | | |
| |||
4736 | 4720 | | |
4737 | 4721 | | |
4738 | 4722 | | |
4739 | | - | |
4740 | | - | |
4741 | | - | |
4742 | | - | |
4743 | 4723 | | |
4744 | 4724 | | |
4745 | | - | |
4746 | | - | |
4747 | | - | |
4748 | 4725 | | |
4749 | 4726 | | |
4750 | 4727 | | |
4751 | 4728 | | |
4752 | | - | |
4753 | | - | |
4754 | 4729 | | |
4755 | 4730 | | |
4756 | | - | |
4757 | | - | |
4758 | 4731 | | |
4759 | 4732 | | |
4760 | 4733 | | |
| |||
0 commit comments