Re: PL/PgSQL: EXIT USING ROLLBACK

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: PL/PgSQL: EXIT USING ROLLBACK
Дата
Msg-id 32610.1406399990@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: PL/PgSQL: EXIT USING ROLLBACK  (Marko Tiikkaja <marko@joh.to>)
Ответы Re: PL/PgSQL: EXIT USING ROLLBACK  (Marko Tiikkaja <marko@joh.to>)
Re: PL/PgSQL: EXIT USING ROLLBACK  (Joel Jacobson <joel@trustly.com>)
Список pgsql-hackers
Marko Tiikkaja <marko@joh.to> writes:
> On 7/26/14, 8:22 PM, Tom Lane wrote:
>> In particular, what happens if someone attaches USING ROLLBACK
>> to an EXIT that does not lead from inside to outside a BEGIN/EXCEPTION
>> block?

> I'm not sure which case you're envisioning.  A label is required, and 
> the label must be that of a BEGIN block with an EXCEPTION block if USING 
> ROLLBACK is specified.  If that doesn't answer your question, could try 
> and explain (perhaps in the form of an example) which problem you're seeing?

Well, restrictions of that sort might dodge the implementation problem,
but they make the construct even less orthogonal.  (And the restriction as
stated isn't good enough anyway, since I could still place such an EXIT in
the EXCEPTION part of the block.)

Basically my point is that this just seems like inventing another way to
do what one can already do with RAISE, and it doesn't have much redeeming
social value to justify the cognitive load of inventing another construct.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Marko Tiikkaja
Дата:
Сообщение: PL/PgSQL: RAISE and the number of parameters
Следующее
От: Marko Tiikkaja
Дата:
Сообщение: Re: PL/PgSQL: EXIT USING ROLLBACK