Re: The new try/catch macros

Поиск
Список
Период
Сортировка
От Thomas Hallgren
Тема Re: The new try/catch macros
Дата
Msg-id 4116820E.6090203@mailblocks.com
обсуждение исходный текст
Ответ на Re: The new try/catch macros  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: The new try/catch macros  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:
> A continue or break exiting the construct would do the wrong thing
> anyway, so I don't see that removing the do{} is very helpful.  The
> point of having it is to make sure that a try/end try block is
> syntactically like a statement, rather than like a { ... } construct.
>
Yes, a continue or break would fail. A PG_TRY_BREAK or PG_TRY_CONTINUE 
(as per my suggestion) would however work just fine.

And, you get a statement syntax anyway since you can do it all within 
one single if/else (i.e. with the PG_END_TRY as two ending braces only).

> This isn't really open for debate, because if we don't put that there,
> pg_indent will go nuts.
>
I'm not familiar with pg_indent but my guess is that the first and 
foremost motivation for its existence is code readability and consistent 
style? It must be simple to make it recognize and handle the new macros.  I volunteer to fix that if such a patch would
bewell received.
 

Regards,

Thomas Hallgren



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

Предыдущее
От: "Marc G. Fournier"
Дата:
Сообщение: Re: Ready for Beta ... ?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: The new try/catch macros