Re: move some bitmapset.c macros to bitmapset.h - Mailing list pgsql-hackers

From Tom Lane
Subject Re: move some bitmapset.c macros to bitmapset.h
Date
Msg-id 3174322.1670250779@sss.pgh.pa.us
Whole thread Raw
In response to Re: move some bitmapset.c macros to bitmapset.h  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: move some bitmapset.c macros to bitmapset.h  (John Naylor <john.naylor@enterprisedb.com>)
List pgsql-hackers
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> On 2022-Dec-05, John Naylor wrote:
>> -#define WORDNUM(x)    ((x) / BITS_PER_BITMAPWORD)
>> -#define BITNUM(x)    ((x) % BITS_PER_BITMAPWORD)

> In this location, nobody can complain about the naming of these macros,
> since they're just used to implement other bitmapset.c code.  However,
> if you move them to the .h file, ISTM you should give them more
> meaningful names.

IMV these are absolutely private to bitmapset.c.  I reject the idea
that they should be exposed publicly, under these names or any others.

Maybe we need some more bitmapset primitive functions?  What is it
you actually want to accomplish in the end?

            regards, tom lane



pgsql-hackers by date:

Previous
From: Alexander Korotkov
Date:
Subject: Re: Allow placeholders in ALTER ROLE w/o superuser
Next
From: Pavel Borisov
Date:
Subject: Re: Allow placeholders in ALTER ROLE w/o superuser