Minor code-cleanliness improvements for btree.
Tom Lane <tgl@sss.pgh.pa.us>
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
Files
| Path | Change | +/− |
|---|---|---|
| contrib/amcheck/verify_nbtree.c | modified | +2 −2 |
| contrib/pgstattuple/pgstattuple.c | modified | +1 −1 |
| src/backend/access/nbtree/nbtpage.c | modified | +3 −3 |
| src/backend/access/nbtree/nbtxlog.c | modified | +2 −2 |
| src/include/access/nbtree.h | modified | +8 −8 |
Discussion
- Small code improvement for btree 9 messages · 2017-08-04 → 2017-09-19