Re: Updates of SE-PostgreSQL 8.4devel patches (r1389) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Updates of SE-PostgreSQL 8.4devel patches (r1389)
Date
Msg-id 23722.1231336498@sss.pgh.pa.us
Whole thread Raw
In response to Re: Updates of SE-PostgreSQL 8.4devel patches (r1389)  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: Updates of SE-PostgreSQL 8.4devel patches (r1389)  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.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


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: HAVE_FSEEKO for WIN32
Next
From: Magnus Hagander
Date:
Subject: Re: [BUGS] BUG #4186: set lc_messages does not work