File tree Expand file tree Collapse file tree 4 files changed +49
-0
lines changed Expand file tree Collapse file tree 4 files changed +49
-0
lines changed Original file line number Diff line number Diff line change @@ -9287,3 +9287,14 @@ select * from plpgsql_check_function('fx()');
9287
9287
(0 rows)
9288
9288
9289
9289
drop function fx();
9290
+ -- should not crash
9291
+ create or replace procedure p1()
9292
+ as $$
9293
+ begin
9294
+ commit;
9295
+ end;
9296
+ $$ language plpgsql;
9297
+ set plpgsql_check.cursors_leaks to on;
9298
+ do $$ declare c cursor for select 1; begin open c; call p1(); end $$;
9299
+ set plpgsql_check.cursors_leaks to default;
9300
+ drop procedure p1;
Original file line number Diff line number Diff line change @@ -9289,3 +9289,14 @@ select * from plpgsql_check_function('fx()');
9289
9289
(0 rows)
9290
9290
9291
9291
drop function fx();
9292
+ -- should not crash
9293
+ create or replace procedure p1()
9294
+ as $$
9295
+ begin
9296
+ commit;
9297
+ end;
9298
+ $$ language plpgsql;
9299
+ set plpgsql_check.cursors_leaks to on;
9300
+ do $$ declare c cursor for select 1; begin open c; call p1(); end $$;
9301
+ set plpgsql_check.cursors_leaks to default;
9302
+ drop procedure p1;
Original file line number Diff line number Diff line change @@ -9286,3 +9286,14 @@ select * from plpgsql_check_function('fx()');
9286
9286
(0 rows)
9287
9287
9288
9288
drop function fx();
9289
+ -- should not crash
9290
+ create or replace procedure p1()
9291
+ as $$
9292
+ begin
9293
+ commit;
9294
+ end;
9295
+ $$ language plpgsql;
9296
+ set plpgsql_check.cursors_leaks to on;
9297
+ do $$ declare c cursor for select 1; begin open c; call p1(); end $$;
9298
+ set plpgsql_check.cursors_leaks to default;
9299
+ drop procedure p1;
Original file line number Diff line number Diff line change @@ -5515,3 +5515,19 @@ $$ language plpgsql;
5515
5515
select * from plpgsql_check_function(' fx()' );
5516
5516
5517
5517
drop function fx();
5518
+
5519
+ -- should not crash
5520
+ create or replace procedure p1()
5521
+ as $$
5522
+ begin
5523
+ commit ;
5524
+ end;
5525
+ $$ language plpgsql;
5526
+
5527
+ set plpgsql_check .cursors_leaks to on ;
5528
+
5529
+ do $$ declare c cursor for select 1 ; begin open c; call p1(); end $$;
5530
+
5531
+ set plpgsql_check .cursors_leaks to default;
5532
+
5533
+ drop procedure p1;
You can’t perform that action at this time.
0 commit comments