pgsql: Fix oversight in PG_RE_THROW processing: it's entirely possible

Started by Tom Laneabout 19 years ago1 messagescomitters
Jump to latest
#1Tom Lane
tgl@sss.pgh.pa.us

Log Message:
-----------
Fix oversight in PG_RE_THROW processing: it's entirely possible that there
isn't any place to throw the error to. If so, we should treat the error
as FATAL, just as we would have if it'd been thrown outside the PG_TRY
block to begin with.

Although this is clearly a *potential* source of bugs, it is not clear
at the moment whether it is an *actual* source of bugs; there may not
presently be any PG_TRY blocks in code that can be reached with no outer
longjmp catcher. So for the moment I'm going to be conservative and not
back-patch this. The change breaks ABI for users of PG_RE_THROW and hence
might create compatibility problems for loadable modules, so we should not
put it into released branches without proof that it's needed.

Modified Files:
--------------
pgsql/src/backend/utils/error:
elog.c (r1.183 -> r1.184)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/error/elog.c.diff?r1=1.183&r2=1.184)
pgsql/src/include/utils:
elog.h (r1.84 -> r1.85)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/elog.h.diff?r1=1.84&r2=1.85)