From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Michael Meskes <meskes(at)postgresql(dot)org> |
Cc: | PostgreSQL Hacker <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Warnings in compile |
Date: | 2009-05-25 17:16:27 |
Message-ID: | 5085.1243271787@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Michael Meskes <meskes(at)postgresql(dot)org> writes:
> On Mon, May 25, 2009 at 12:10:49PM -0400, Tom Lane wrote:
>> Consider
>>
>> if (...)
>> macro;
>> else
>> something-else;
> Sure, but some/most/all macros are called as
> MACRO;
> No real reason there it seems.
Well, they are called that way right now. The point of this discussion
is making the code safe against easily-foreseeable future changes.
Now, I'm privately of the opinion that those macros were a terrible idea
to begin with, because of the fact that they contain continue and break
statements; not only does that make them not act like self-contained
code, but they will break --- silently --- if anyone tries to put them
inside nested loops or switch statements. However, that doesn't seem
nearly as likely as trying to put them inside if-statements; so I'll
just grumble to myself while insisting that we at least keep them safe
against that case.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2009-05-25 17:20:24 | Re: [PATCH] cleanup hashindex for pg_migrator hashindex compat mode (for 8.4) |
Previous Message | Tom Lane | 2009-05-25 17:07:20 | Re: [PATCH] cleanup hashindex for pg_migrator hashindex compat mode (for 8.4) |