| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Thomas Hallgren <thhal(at)mailblocks(dot)com> |
| Cc: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: The new try/catch macros |
| Date: | 2004-08-08 18:54:05 |
| Message-ID: | 20597.1091991245@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Thomas Hallgren <thhal(at)mailblocks(dot)com> writes:
> 1. You use a do {...} while(0) construct to wrap the whole thing. This
> actually makes it impossible to write code that does a try/catch within
> a loop that contains code surrounding it since a continue or break will
> then end up in the wrong place.
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.
> 3. IMHO, it's a bit ugly to require parenthesis and semicolons at the
> end of the macros.
This isn't really open for debate, because if we don't put that there,
pg_indent will go nuts.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Kevin Brown | 2004-08-08 19:09:32 | Re: DROP TABLESPACE causes panic during recovery |
| Previous Message | Marc G. Fournier | 2004-08-08 18:53:58 | Re: Dead cvsweb link |