Re: alternative to PG_CATCH

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: alternative to PG_CATCH
Дата
Msg-id 95a822c3-728b-af0e-d7e5-71890507ae0c@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: alternative to PG_CATCH  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: alternative to PG_CATCH
Список pgsql-hackers
On 2018-12-14 16:49, Tom Lane wrote:
> I don't especially like the MACRO({...}) proposal, because it looks way
> too much like gcc's special syntax for "statement expressions".  If we
> have to go this way, I'd rather see if MACRO((...)) can be made to work.
> But I question your assumption that we have to have two physical copies
> of the "finally" code.  There's nothing wrong with implementing this
> sort of infrastructure with some goto's, or whatever else we have to
> have to make it work.  Also, it'd look more natural as an extension
> to the existing PG_TRY infrastructure if the source code were like
> 
>     PG_TRY();
>     {
>         ...
>     }
>     PG_FINALLY();
>     {
>         ...
>     }
>     PG_END_TRY();

Here is a new implementation that works just like that.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Вложения

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: base backup client as auxiliary backend process
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Add const qualifiers to internal range type APIs