Skip to content

Commit f25fd4e

Browse files
author
hackorum
committed
Apply 0002-note-no-return-in-pg_try.patch
1 parent 6e89028 commit f25fd4e

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/include/utils/elog.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,11 @@ extern PGDLLIMPORT ErrorContextCallback *error_context_stack;
356356
* You cannot use both PG_CATCH() and PG_FINALLY() in the same
357357
* PG_TRY()/PG_END_TRY() block.
358358
*
359+
* The code that might throw ereport(ERROR) cannot contain any non local
360+
* control flow other than ereport(ERROR) e.g.: return, goto, break, continue.
361+
* In other words once PG_TRY() is executed, either PG_CATCH() or PG_FINALLY()
362+
* must be executed as well.
363+
*
359364
* Note: while the system will correctly propagate any new ereport(ERROR)
360365
* occurring in the recovery section, there is a small limit on the number
361366
* of levels this will work for. It's best to keep the error recovery

0 commit comments

Comments
 (0)