Skip to content

Commit c603b39

Browse files
committed
Fix misleading PG_RE_THROW commentary
The old verbiage indicated that PG_RE_THROW is optional, which is not really true. This has confused many people, so it seems worth fixing. Discussion: https://postgr.es/m/[email protected]
1 parent 256fc00 commit c603b39

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: src/include/utils/elog.h

+4-2
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,10 @@ extern PGDLLIMPORT ErrorContextCallback *error_context_stack;
272272
* PG_END_TRY();
273273
*
274274
* (The braces are not actually necessary, but are recommended so that
275-
* pgindent will indent the construct nicely.) The error recovery code
276-
* can optionally do PG_RE_THROW() to propagate the same error outwards.
275+
* pgindent will indent the construct nicely.) The error recovery code
276+
* can either do PG_RE_THROW to propagate the error outwards, or do a
277+
* (sub)transaction abort. Failure to do so may leave the system in an
278+
* inconsistent state for further processing.
277279
*
278280
* Note: while the system will correctly propagate any new ereport(ERROR)
279281
* occurring in the recovery section, there is a small limit on the number

0 commit comments

Comments
 (0)