pgsql: Add bms_get_singleton_member(), and use it where appropriate. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Add bms_get_singleton_member(), and use it where appropriate.
Date
Msg-id E1XuR1p-0003fj-Tt@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Add bms_get_singleton_member(), and use it where appropriate.

This patch adds a function that replaces a bms_membership() test followed
by a bms_singleton_member() call, performing both the test and the
extraction of a singleton set's member in one scan of the bitmapset.
The performance advantage over the old way is probably minimal in current
usage, but it seems worthwhile on notational grounds anyway.

David Rowley

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/d25367ec4f869aac80e97964fa5d7143536818b1

Modified Files
--------------
src/backend/nodes/bitmapset.c             |   44 +++++++++++++++++++++++++++++
src/backend/optimizer/path/equivclass.c   |    3 +-
src/backend/optimizer/plan/analyzejoins.c |    7 +++--
src/backend/optimizer/util/placeholder.c  |    4 +--
src/include/nodes/bitmapset.h             |    1 +
5 files changed, 52 insertions(+), 7 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Add bms_next_member(), and use it where appropriate.
Next
From: Alvaro Herrera
Date:
Subject: pgsql: Update transaction README for persistent multixacts