forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite77216f
committed
Simplify more checks related to set-returning functions
This makes more consistent the SRF-related checks in the area ofPL/pgSQL, PL/Perl, PL/Tcl, pageinspect and some of the JSON workerfunctions, making it easier to grep for the same error patterns throughthe code, reducing a bit the translation work.It is worth noting that each_worker_jsonb()/each_worker() in jsonfuncs.cand pageinspect's brin_page_items() were doing a check on expectedDescthat is not required as they fetch their tuple descriptor directly fromget_call_result_type(). This looks like a set of copy-paste errors thathave spread over the years.This commit is a continuation of the changes begun in07daca5, for anyremaining code paths on sight. Likefcc2817, this makes the code moreconsistent, easing the integration of a larger patch that will refactorthe way tuplestores are created and checked in a good portion of theset-returning functions present in core.I have worked my way through the changes of this patch by myself, andRanier has proposed the same changes in a different thread in parallel,though there were some inconsistencies related in expectedDesc in whatwas proposed by him.Author: Michael Paquier, Ranier VilelaDiscussion:https://postgr.es/m/CAAKRu_azyd1Z3W_r7Ou4sorTjRCs+PxeHw1CWJeXKofkE6TuZg@mail.gmail.comDiscussion:https://postgr.es/m/CAEudQApm=AFuJjEHLBjBcJbxcw4pBMwg2sHwXyCXYcbBOj3hpg@mail.gmail.com1 parentfcc2817 commite77216f
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 changedLines changed: 1 addition & 2 deletions
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 |
| |
|
Lines changed: 35 additions & 26 deletions
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 |
| |
|
Lines changed: 7 additions & 4 deletions
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 |
| |
|
Lines changed: 14 additions & 5 deletions
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 |
| |
|
Lines changed: 6 additions & 2 deletions
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
Comments
(0)