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@postgresql.org
Subject: pgsql: Minor code-cleanliness improvements for btree.
Date: Mon, 18 Sep 2017 20:36:34 +0000
Message-ID: <E1du2mQ-0007nw-Rs@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Minor code-cleanliness improvements for btree.

Make the btree page-flags test macros (P_ISLEAF and friends) return clean
boolean values, rather than values that might not fit in a bool.  Use them
in a few places that were randomly referencing the flag bits directly.

In passing, change access/nbtree/'s only direct use of BUFFER_LOCK_SHARE to
BT_READ.  (Some think we should go the other way, but as long as we have
BT_READ/BT_WRITE, let's use them consistently.)

Masahiko Sawada, reviewed by Doug Doole

Discussion: https://postgr.es/m/CAD21AoBmWPeN=WBB5Jvyz_Nt3rmW1ebUyAnk3ZbJP3RMXALJog@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/eb5c404b17752ca566947f12cb702438dcccdcb1

Modified Files
--------------
contrib/amcheck/verify_nbtree.c     |  4 ++--
contrib/pgstattuple/pgstattuple.c   |  2 +-
src/backend/access/nbtree/nbtpage.c |  6 +++---
src/backend/access/nbtree/nbtxlog.c |  4 ++--
src/include/access/nbtree.h         | 16 ++++++++--------
5 files changed, 16 insertions(+), 16 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Message-ID: <E1du2mQ-0007nw-Rs@gemulon.postgresql.org>
Permalink:  ../E1du2mQ-0007nw-Rs@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1du2mQ-0007nw-Rs@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: Minor code-cleanliness improvements for btree.
  In-Reply-To: <E1du2mQ-0007nw-Rs@gemulon.postgresql.org>
  References: <E1du2mQ-0007nw-Rs@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