Re: PL/Python: Fix return in the middle of PG_TRY() block.
От | Tom Lane |
---|---|
Тема | Re: PL/Python: Fix return in the middle of PG_TRY() block. |
Дата | |
Msg-id | 1864041.1673882943@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: PL/Python: Fix return in the middle of PG_TRY() block. (Xing Guo <higuoxing@gmail.com>) |
Ответы |
Re: PL/Python: Fix return in the middle of PG_TRY() block.
Re: PL/Python: Fix return in the middle of PG_TRY() block. |
Список | pgsql-hackers |
Xing Guo <higuoxing@gmail.com> writes: > Are there any unsafe codes in pltcl.c? The return statement is in the > PG_CATCH() block, I think the exception stack has been recovered in > PG_CATCH block so the return statement in PG_CATCH block should be ok? Yes, the stack has already been unwound at the start of a PG_CATCH (or PG_FINALLY) block, so there is no reason to avoid returning out of those. In principle you could also mess things up with a "continue", "break", or "goto" leading out of PG_TRY. That's probably far less likely than "return", but I wonder whether Andres' compiler hack will catch that. regards, tom lane
В списке pgsql-hackers по дате отправления: