From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | Re: pgsql: Extend PageIsVerified() to handle more custom options |
Date: | 2020-10-27 02:12:39 |
Message-ID: | 20201027021239.GC28445@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
On Mon, Oct 26, 2020 at 09:29:46PM -0400, Tom Lane wrote:
> Hm, I suspect what Alvaro meant was
>
> #define PageIsVerified(page, blkno) \
> - PageIsVerifiedExtended(page, blkno, \
> + PageIsVerifiedExtended((page), (blkno), \
>
> But IMV that's not necessary: if the argument parsed as a single
> function/macro argument before, it still will do so. The places
> where you have to be careful to add parentheses are where the
> macro argument is used as part of a larger expression that is
> not just a function/macro argument.
Thanks. I really thought that this remark was for the bit-flag
argument for readability reasons, not the two others as we don't do
that in other places (varbit.h, bufpage.h, timestamp.h, brin_page.h,
etc.). Perhaps I just missed the point.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2020-10-27 02:38:29 | pgsql: doc: simplify wording of function error affects |
Previous Message | Tom Lane | 2020-10-27 01:29:46 | Re: pgsql: Extend PageIsVerified() to handle more custom options |