Created
January 12, 2021 08:33
-
-
Save onderkalaci/4c4a8267a0f7e582f3a321ee0111e1c2 to your computer and use it in GitHub Desktop.
Overly Simplified Savepoint Bug Repro
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE OR REPLACE PROCEDURE public.top_function() LANGUAGE PLPGSQL AS $procedure$ | |
| begin | |
| call second_function_that_fails(); | |
| EXCEPTION | |
| when others then | |
| RAISE NOTICE 'Top function exception handling'; | |
| call third_function_that_fails(); | |
| end; $procedure$; | |
| CREATE OR REPLACE PROCEDURE public.second_function_that_fails() LANGUAGE PLPGSQL AS $procedure$ | |
| begin | |
| PERFORM user_id/0 FROM users_table as foo_second; | |
| end; $procedure$; | |
| CREATE OR REPLACE PROCEDURE public.third_function_that_fails() LANGUAGE PLPGSQL AS $procedure$ | |
| begin | |
| PERFORM user_id/0 FROM users_table as foo_third; | |
| EXCEPTION | |
| when others then | |
| RAISE NOTICE 'Third function failed'; | |
| end; $procedure$; | |
| CALL top_function(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment