Commit e77216f
committed
Simplify more checks related to set-returning functions
This makes more consistent the SRF-related checks in the area of
PL/pgSQL, PL/Perl, PL/Tcl, pageinspect and some of the JSON worker
functions, making it easier to grep for the same error patterns through
the code, reducing a bit the translation work.
It is worth noting that each_worker_jsonb()/each_worker() in jsonfuncs.c
and pageinspect's brin_page_items() were doing a check on expectedDesc
that is not required as they fetch their tuple descriptor directly from
get_call_result_type(). This looks like a set of copy-paste errors that
have spread over the years.
This commit is a continuation of the changes begun in 07daca5, for any
remaining code paths on sight. Like fcc2817, this makes the code more
consistent, easing the integration of a larger patch that will refactor
the way tuplestores are created and checked in a good portion of the
set-returning functions present in core.
I have worked my way through the changes of this patch by myself, and
Ranier has proposed the same changes in a different thread in parallel,
though there were some inconsistencies related in expectedDesc in what
was proposed by him.
Author: Michael Paquier, Ranier Vilela
Discussion: https://postgr.es/m/CAAKRu_azyd1Z3W_r7Ou4sorTjRCs+PxeHw1CWJeXKofkE6TuZg@mail.gmail.com
Discussion: https://postgr.es/m/CAEudQApm=AFuJjEHLBjBcJbxcw4pBMwg2sHwXyCXYcbBOj3hpg@mail.gmail.com1 parent fcc2817 commit e77216f
File tree
5 files changed
+63
-39
lines changed- contrib/pageinspect
- src
- backend/utils/adt
- pl
- plperl
- plpgsql/src
- tcl
5 files changed
+63
-39
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
152 | | - | |
| 151 | + | |
153 | 152 | | |
154 | 153 | | |
155 | 154 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1927 | 1927 | | |
1928 | 1928 | | |
1929 | 1929 | | |
1930 | | - | |
1931 | | - | |
1932 | | - | |
| 1930 | + | |
| 1931 | + | |
| 1932 | + | |
| 1933 | + | |
| 1934 | + | |
1933 | 1935 | | |
1934 | 1936 | | |
1935 | | - | |
1936 | | - | |
| 1937 | + | |
1937 | 1938 | | |
1938 | 1939 | | |
1939 | 1940 | | |
1940 | 1941 | | |
1941 | | - | |
1942 | | - | |
1943 | | - | |
1944 | | - | |
| 1942 | + | |
1945 | 1943 | | |
1946 | 1944 | | |
1947 | 1945 | | |
| |||
2039 | 2037 | | |
2040 | 2038 | | |
2041 | 2039 | | |
2042 | | - | |
2043 | | - | |
2044 | | - | |
| 2040 | + | |
| 2041 | + | |
| 2042 | + | |
| 2043 | + | |
| 2044 | + | |
| 2045 | + | |
2045 | 2046 | | |
2046 | 2047 | | |
2047 | | - | |
2048 | | - | |
| 2048 | + | |
2049 | 2049 | | |
2050 | 2050 | | |
2051 | 2051 | | |
| |||
2227 | 2227 | | |
2228 | 2228 | | |
2229 | 2229 | | |
2230 | | - | |
2231 | | - | |
| 2230 | + | |
| 2231 | + | |
| 2232 | + | |
| 2233 | + | |
| 2234 | + | |
| 2235 | + | |
2232 | 2236 | | |
2233 | 2237 | | |
2234 | 2238 | | |
2235 | | - | |
2236 | | - | |
| 2239 | + | |
2237 | 2240 | | |
2238 | 2241 | | |
2239 | 2242 | | |
| |||
2336 | 2339 | | |
2337 | 2340 | | |
2338 | 2341 | | |
2339 | | - | |
2340 | | - | |
| 2342 | + | |
| 2343 | + | |
| 2344 | + | |
| 2345 | + | |
| 2346 | + | |
| 2347 | + | |
2341 | 2348 | | |
2342 | 2349 | | |
2343 | 2350 | | |
2344 | | - | |
2345 | | - | |
| 2351 | + | |
2346 | 2352 | | |
2347 | 2353 | | |
2348 | 2354 | | |
| |||
3798 | 3804 | | |
3799 | 3805 | | |
3800 | 3806 | | |
3801 | | - | |
3802 | | - | |
| 3807 | + | |
| 3808 | + | |
| 3809 | + | |
| 3810 | + | |
| 3811 | + | |
| 3812 | + | |
3803 | 3813 | | |
3804 | 3814 | | |
3805 | | - | |
3806 | | - | |
| 3815 | + | |
3807 | 3816 | | |
3808 | 3817 | | |
3809 | 3818 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2414 | 2414 | | |
2415 | 2415 | | |
2416 | 2416 | | |
2417 | | - | |
2418 | | - | |
| 2417 | + | |
2419 | 2418 | | |
2420 | 2419 | | |
2421 | | - | |
2422 | | - | |
| 2420 | + | |
| 2421 | + | |
| 2422 | + | |
| 2423 | + | |
| 2424 | + | |
| 2425 | + | |
2423 | 2426 | | |
2424 | 2427 | | |
2425 | 2428 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
629 | 629 | | |
630 | 630 | | |
631 | 631 | | |
632 | | - | |
633 | | - | |
| 632 | + | |
634 | 633 | | |
635 | 634 | | |
636 | 635 | | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
637 | 642 | | |
638 | 643 | | |
639 | 644 | | |
| |||
3645 | 3650 | | |
3646 | 3651 | | |
3647 | 3652 | | |
3648 | | - | |
3649 | | - | |
3650 | | - | |
| 3653 | + | |
3651 | 3654 | | |
3652 | 3655 | | |
3653 | 3656 | | |
3654 | 3657 | | |
| 3658 | + | |
| 3659 | + | |
| 3660 | + | |
| 3661 | + | |
| 3662 | + | |
| 3663 | + | |
3655 | 3664 | | |
3656 | 3665 | | |
3657 | 3666 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
829 | 829 | | |
830 | 830 | | |
831 | 831 | | |
832 | | - | |
833 | | - | |
| 832 | + | |
834 | 833 | | |
835 | 834 | | |
836 | 835 | | |
837 | 836 | | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
838 | 842 | | |
839 | 843 | | |
840 | 844 | | |
| |||
0 commit comments