File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -2268,12 +2268,12 @@ commit;
2268
2268
-- should fail
2269
2269
fetch next from test1;
2270
2270
ERROR: cursor "test1" does not exist
2271
- create function refcursor_test2(int) returns boolean as $$
2271
+ create function refcursor_test2(int, int ) returns boolean as $$
2272
2272
declare
2273
- c1 cursor (param integer ) for select * from rc_test where a > param ;
2273
+ c1 cursor (param1 int, param2 int ) for select * from rc_test where a > param1 and b > param2 ;
2274
2274
nonsense record;
2275
2275
begin
2276
- open c1($1);
2276
+ open c1($1, $2 );
2277
2277
fetch c1 into nonsense;
2278
2278
close c1;
2279
2279
if found then
@@ -2283,8 +2283,8 @@ begin
2283
2283
end if;
2284
2284
end
2285
2285
$$ language 'plpgsql';
2286
- select refcursor_test2(20000) as "Should be false",
2287
- refcursor_test2(20) as "Should be true";
2286
+ select refcursor_test2(20000, 20000 ) as "Should be false",
2287
+ refcursor_test2(20, 20 ) as "Should be true";
2288
2288
Should be false | Should be true
2289
2289
-----------------+----------------
2290
2290
f | t
Original file line number Diff line number Diff line change @@ -1926,12 +1926,12 @@ commit;
1926
1926
-- should fail
1927
1927
fetch next from test1;
1928
1928
1929
- create function refcursor_test2 (int ) returns boolean as $$
1929
+ create function refcursor_test2 (int , int ) returns boolean as $$
1930
1930
declare
1931
- c1 cursor (param integer ) for select * from rc_test where a > param ;
1931
+ c1 cursor (param1 int , param2 int ) for select * from rc_test where a > param1 and b > param2 ;
1932
1932
nonsense record;
1933
1933
begin
1934
- open c1($1 );
1934
+ open c1($1 , $ 2 );
1935
1935
fetch c1 into nonsense;
1936
1936
close c1;
1937
1937
if found then
@@ -1942,8 +1942,8 @@ begin
1942
1942
end
1943
1943
$$ language ' plpgsql' ;
1944
1944
1945
- select refcursor_test2(20000 ) as " Should be false" ,
1946
- refcursor_test2(20 ) as " Should be true" ;
1945
+ select refcursor_test2(20000 , 20000 ) as " Should be false" ,
1946
+ refcursor_test2(20 , 20 ) as " Should be true" ;
1947
1947
1948
1948
--
1949
1949
-- tests for "raise" processing
You can’t perform that action at this time.
0 commit comments