Re: pgsql: Extend PageIsVerified() to handle more custom options
| От | Tom Lane |
|---|---|
| Тема | Re: pgsql: Extend PageIsVerified() to handle more custom options |
| Дата | |
| Msg-id | 913282.1603762186@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: pgsql: Extend PageIsVerified() to handle more custom options (Michael Paquier <michael@paquier.xyz>) |
| Список | pgsql-committers |
Michael Paquier <michael@paquier.xyz> writes:
> On Mon, Oct 26, 2020 at 11:39:33AM -0300, Alvaro Herrera wrote:
>> Please remember that in the macro definition, the arguments should be
>> enclosed in parens. No bug here at present, but it seems better to be
>> cautious.
> Indeed, I can see similar changes in the history of the tree. Do you
> think that doing something like the attached is sufficient?
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.
regards, tom lane
В списке pgsql-committers по дате отправления: