Re: Consistently use macro HeapTupleIsValid to check the validity of tuples in tablecmds.c - Mailing list pgsql-hackers

From Tender Wang
Subject Re: Consistently use macro HeapTupleIsValid to check the validity of tuples in tablecmds.c
Date
Msg-id CAHewXN=Qr-DOQO4XQYDP8L58wy9VckeV9_3dFXSj5NxWHOb8dg@mail.gmail.com
Whole thread Raw
In response to Re: Consistently use macro HeapTupleIsValid to check the validity of tuples in tablecmds.c  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers


Michael Paquier <michael@paquier.xyz> 于2025年4月10日周四 10:53写道:
On Wed, Apr 09, 2025 at 05:43:24PM +0300, Heikki Linnakangas wrote:
> Agreed. I use both, depending on which mood I'm in.

Same here, extended to OidIsValid(), HeapTupleIsValid(), XLogRecPtr,
etc., and I tend to prefer such macros, except if consistency of the
surroundings matter most.  FWIW, I think that living with the current
state of things to limit backpatch pain is fine.  There is no need to
change the existing code as an attempt to apply more standardization
even if one or more code grammar patterns mean the same thing.

OK, makes sense.


--
Thanks, Tender Wang

pgsql-hackers by date:

Previous
From: Kirill Reshke
Date:
Subject: Re: speedup COPY TO for partitioned table.
Next
From: jian he
Date:
Subject: Re: bug in stored generated column over domain with constraints.