From: | Thomas Hallgren <thhal(at)mailblocks(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: The new try/catch macros |
Date: | 2004-08-08 19:42:06 |
Message-ID: | 4116820E.6090203@mailblocks.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 be well received.
Regards,
Thomas Hallgren
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-08-08 19:46:55 | Re: The new try/catch macros |
Previous Message | Marc G. Fournier | 2004-08-08 19:36:53 | Re: Ready for Beta ... ? |