pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix style violations in syscache lookups.
2+ messages / 1 participants
[nested] [flat]

* pgsql: Fix style violations in syscache lookups.
@ 2019-05-05 17:10  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2019-05-05 17:10 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Fix style violations in syscache lookups.
@ 2019-05-05 17:10  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2019-05-05 17:10 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/000f557c3111add0e5aa28936ba8ad49ff896667

Modified Files
--------------
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/tablecmds.c     | 11 +++++------
src/backend/optimizer/util/plancat.c |  2 +-
6 files changed, 11 insertions(+), 12 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2019-05-05 17:10 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-05-05 17:10 pgsql: Fix style violations in syscache lookups. Tom Lane <tgl@sss.pgh.pa.us>
2019-05-05 17:10 pgsql: Fix style violations in syscache lookups. Tom Lane <tgl@sss.pgh.pa.us>

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