aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_expr.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2023-03-02 11:34:29 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2023-03-02 11:34:29 -0500
commit462bb7f12851c215dfc21a88ae0ed4bf7fcb36a3 (patch)
tree1ab5f6429f5833fd548c1eb079d6129339acb077 /src/backend/parser/parse_expr.c
parent2f80c95740f88e9e3e04ee0c2063e55a497315b4 (diff)
downloadpostgresql-462bb7f12851c215dfc21a88ae0ed4bf7fcb36a3.tar.gz
postgresql-462bb7f12851c215dfc21a88ae0ed4bf7fcb36a3.zip
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
Diffstat (limited to 'src/backend/parser/parse_expr.c')
-rw-r--r--src/backend/parser/parse_expr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c
index 7ff41acb846..78221d2e0f7 100644
--- a/src/backend/parser/parse_expr.c
+++ b/src/backend/parser/parse_expr.c
@@ -2759,7 +2759,7 @@ make_row_comparison_op(ParseState *pstate, List *opname,
* them ... this coding arbitrarily picks the lowest btree strategy
* number.
*/
- i = bms_first_member(strats);
+ i = bms_next_member(strats, -1);
if (i < 0)
{
/* No common interpretation, so fail */