Re: Consistently use macro HeapTupleIsValid to check the validity of tuples in tablecmds.c

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Tender Wang <tndrwang(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Consistently use macro HeapTupleIsValid to check the validity of tuples in tablecmds.c
Date: 2025-04-10 02:53:36
Message-ID: Z_cysAs4dJtNtXUc@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2025-04-10 03:00:20 Re: Fix 035_standby_logical_decoding.pl race conditions
Previous Message jian he 2025-04-10 02:44:56 Re: speedup COPY TO for partitioned table.