pgsql: Add bms_prev_member function

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add bms_prev_member function
Date: 2018-04-07 21:02:18
Message-ID: E1f4uyY-0005jD-MV@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add bms_prev_member function

This works very much like the existing bms_last_member function, only it
traverses through the Bitmapset in the opposite direction from the most
significant bit down to the least significant bit. A special prevbit value of
-1 may be used to have the function determine the most significant bit. This
is useful for starting a loop. When there are no members less than prevbit,
the function returns -2 to indicate there are no more members.

Author: David Rowley
Discussion: https://postgr.es/m/CAKJS1f-K=3d5MDASNYFJpUpc20xcBnAwNC1-AOeunhn0OtkWbQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5c0675215e153ba1297fd494b34af2fdebd645d1

Modified Files
--------------
src/backend/nodes/bitmapset.c | 95 +++++++++++++++++++++++++++++++++++++++++++
src/include/nodes/bitmapset.h | 1 +
2 files changed, 96 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Erik Rijkers 2018-04-07 21:21:54 Re: pgsql: Indexes with INCLUDE columns and their support in B-tree
Previous Message Teodor Sigaev 2018-04-07 20:51:10 Re: pgsql: Indexes with INCLUDE columns and their support in B-tree