pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Extend PageIsVerified() to handle more custom options
Date: Tue, 27 Oct 2020 11:12:39 +0900
Message-ID: <20201027021239.GC28445@paquier.xyz> (raw)
In-Reply-To: <913282.1603762186@sss.pgh.pa.us>
References: <E1kWqx0-0005Rk-TO@gemulon.postgresql.org>
	<20201026143933.GA5304@alvherre.pgsql>
	<20201027001801.GA28445@paquier.xyz>
	<913282.1603762186@sss.pgh.pa.us>

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

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (8+ messages)  latest in thread

Message-ID: <20201027021239.GC28445@paquier.xyz>
Permalink:  ../20201027021239.GC28445@paquier.xyz/
Also on:    postgresql.org/message-id/20201027021239.GC28445@paquier.xyz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz, tgl@sss.pgh.pa.us, alvherre@alvh.no-ip.org
  Subject: Re: pgsql: Extend PageIsVerified() to handle more custom options
  In-Reply-To: <20201027021239.GC28445@paquier.xyz>
  References: <E1kWqx0-0005Rk-TO@gemulon.postgresql.org> <20201026143933.GA5304@alvherre.pgsql> <20201027001801.GA28445@paquier.xyz> <913282.1603762186@sss.pgh.pa.us> <20201027021239.GC28445@paquier.xyz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox