aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/mcxtfuncs.c
diff options
context:
space:
mode:
authorDavid Rowley <drowley@postgresql.org>2020-08-26 10:51:36 +1200
committerDavid Rowley <drowley@postgresql.org>2020-08-26 10:51:36 +1200
commitc34605daed563fcade07a9f45bcf440459599c00 (patch)
tree5d6ade2b0cc2d49c5aa76c5449e8291af16095a2 /src/backend/utils/adt/mcxtfuncs.c
parentff60394a8c9a7af8b32de420ccb54a20a0f019c1 (diff)
downloadpostgresql-c34605daed563fcade07a9f45bcf440459599c00.tar.gz
postgresql-c34605daed563fcade07a9f45bcf440459599c00.zip
Fixup some misusages of bms_num_members()
It's a bit inefficient to test if a Bitmapset is empty by counting all the members and seeing if that number is zero. It's much better just to use bms_is_empty(). Likewise for checking if there are at least two members, just use bms_membership(), which does not need to do anything more after finding two members. Discussion: https://postgr.es/m/CAApHDvpvwm_QjbDOb5xga%2BKmX9XkN9xQavNGm3SvDbVnCYOerQ%40mail.gmail.com Reviewed-by: Tomas Vondra
Diffstat (limited to 'src/backend/utils/adt/mcxtfuncs.c')
0 files changed, 0 insertions, 0 deletions