pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix style violations in syscache lookups.
Date: Sun, 05 May 2019 17:10:15 +0000
Message-ID: <E1hNKeV-00008W-Vo@gemulon.postgresql.org> (raw)

Fix style violations in syscache lookups.

Project style is to check the success of SearchSysCacheN and friends
by applying HeapTupleIsValid to the result.  A tiny minority of calls
creatively did it differently.  Bring them into line with the rest.

This is just cosmetic, since HeapTupleIsValid is indeed just a null
check at the moment ... but that may not be true forever, and in any
case it puts a mental burden on readers who may wonder why these
call sites are not like the rest.

Back-patch to v11 just to keep the branches in sync.  (The bulk of these
errors seem to have originated in v11 or v12, though a few are old.)

Per searching to see if anyplace else had made the same error
repaired in 62148c352.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9691aa72e2a7fb146ac759e1f8a8b04962128cc0

Modified Files
--------------
src/backend/catalog/partition.c         |  2 +-
src/backend/catalog/pg_publication.c    |  2 +-
src/backend/commands/indexcmds.c        |  2 +-
src/backend/commands/opclasscmds.c      |  4 ++--
src/backend/commands/operatorcmds.c     |  2 +-
src/backend/commands/statscmds.c        |  2 +-
src/backend/commands/tablecmds.c        | 16 +++++++---------
src/backend/optimizer/util/appendinfo.c |  2 +-
src/backend/optimizer/util/plancat.c    |  2 +-
9 files changed, 16 insertions(+), 18 deletions(-)



view thread (2+ messages)  latest in thread

Message-ID: <E1hNKeV-00008W-Vo@gemulon.postgresql.org>
Permalink:  ../E1hNKeV-00008W-Vo@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1hNKeV-00008W-Vo@gemulon.postgresql.org

 · 

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: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Fix style violations in syscache lookups.
  In-Reply-To: <E1hNKeV-00008W-Vo@gemulon.postgresql.org>
  References: <E1hNKeV-00008W-Vo@gemulon.postgresql.org>

* 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