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)
Список
Дерево обсуждения
pgsql: Extend PageIsVerified() to handle more custom options Michael Paquier <michael@paquier.xyz>
Re: pgsql: Extend PageIsVerified() to handle more custom options Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: pgsql: Extend PageIsVerified() to handle more custom options Michael Paquier <michael@paquier.xyz>
Re: pgsql: Extend PageIsVerified() to handle more custom options Tom Lane <tgl@sss.pgh.pa.us>
Michael Paquier 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 по дате отправления
От: Michael Paquier
Дата: