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

From Tender Wang
Subject Consistently use macro HeapTupleIsValid to check the validity of tuples in tablecmds.c
Date
Msg-id CAHewXNmz6huegXfMvBE=t-Ngyrh=sS=J2VB+hnhd+sadppdXww@mail.gmail.com
Whole thread Raw
Responses Re: Consistently use macro HeapTupleIsValid to check the validity of tuples in tablecmds.c
List pgsql-hackers
Hi,

While working on another patch, I find that tablecmds.c now has three
ways to check the validity of catalog tuples.
i.
if (tuple != NULL)

ii.
if (!tuple)

iii.
if (HeapTupleIsValid(tuple)

In tablecmds.c, most checks use macro HeapTupleIsValid. For code readability,
I changed the first and the second formats to the third one, e.g., using HeapTupleIsValid.

BTW,  I searched the other files, some files also have different ways to check the validity of tuples.
But the attached patch only focuses on tablecmds.c

Any thoughts?

--
Thanks, Tender Wang
Attachment

pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: Add missing PGDLLIMPORT markings
Next
From: Tomas Vondra
Date:
Subject: Re: Draft for basic NUMA observability