Remove bms_first_member().
Tom Lane <tgl@sss.pgh.pa.us>
Remove bms_first_member(). This function has been semi-deprecated ever since we invented bms_next_member(). Its habit of scribbling on the input bitmapset isn't great, plus for sufficiently large bitmapsets it would take O(N^2) time to complete a loop. Now we have the additional problem that reducing the input to empty while leaving it still accessible would violate a planned invariant. So let's just get rid of it, after updating the few extant callers to use bms_next_member(). Patch by me; thanks to Nathan Bossart and Richard Guo for review. Discussion: https://postgr.es/m/1159933.1677621588@sss.pgh.pa.us
Files
| Path | Change | +/− |
|---|---|---|
| contrib/file_fdw/file_fdw.c | modified | +5 −4 |
| contrib/sepgsql/dml.c | modified | +2 −1 |
| src/backend/access/heap/heapam.c | modified | +9 −18 |
| src/backend/executor/nodeAgg.c | modified | +2 −1 |
| src/backend/nodes/bitmapset.c | modified | +0 −42 |
| src/backend/optimizer/plan/subselect.c | modified | +2 −1 |
| src/backend/parser/parse_expr.c | modified | +1 −1 |
| src/backend/replication/logical/relation.c | modified | +2 −1 |
| src/include/nodes/bitmapset.h | modified | +0 −1 |
Discussion
- Making empty Bitmapsets always be NULL 29 messages · 2023-02-28 → 2023-07-04