Re: Updates of SE-PostgreSQL 8.4devel patches (r1389)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: KaiGai Kohei <kaigai(at)kaigai(dot)gr(dot)jp>, KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com>, pgsql-hackers(at)postgresql(dot)org, bruce(at)momjian(dot)us, simon(at)2ndQuadrant(dot)com
Subject: Re: Updates of SE-PostgreSQL 8.4devel patches (r1389)
Date: 2009-01-07 13:54:58
Message-ID: 23722.1231336498@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Oh, the patch also removes a bunch of "continue" statements that, as far
> as I can tell, no longer work after the macros were wrapped in
> do { ... } while (0) :-( I don't see any nice way to put the facility
> back.

Hmm ... I guess you could make the wrapping be "if (...) { ... } else {}"
instead of do/while, but I'm pretty dubious of having a continue in the
macros anyway --- that's an even stronger assumption about the context
the macro is being used in than the original gripe.

What you seem to be supposing is that the only possible use pattern
for these macros is a for-loop containing nothing but calls to one
or another of the macros. If so, shouldn't you be wrapping things
up at an even higher level? Maybe turn the whole thing into
table-driven code?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2009-01-07 13:55:42 Re: [BUGS] BUG #4186: set lc_messages does not work
Previous Message Andrew Dunstan 2009-01-07 13:52:10 Re: HAVE_FSEEKO for WIN32