Re: remove open-coded popcount in acl.c

Nathan Bossart <nathandbossart@gmail.com>

From: Nathan Bossart <nathandbossart@gmail.com>
To: Álvaro Herrera <alvherre@alvh.no-ip.org>
Cc: pgsql-hackers@postgresql.org
Date: 2025-03-12T18:19:09Z
Lists: pgsql-hackers

Attachments

On Wed, Mar 12, 2025 at 05:23:25PM +0100, Álvaro Herrera wrote:
> Strange: this code is not covered by any tests.
> 
> https://coverage.postgresql.org/src/backend/utils/adt/acl.c.gcov.html#5533
> https://coverage.postgresql.org/src/backend/utils/adt/acl.c.gcov.html#5438

Huh.  Well, it's easy enough to add some basic tests for the grantor
selection machinery.  Here's a first try.

-- 
nathan

Commits

  1. Remove count_one_bits() in acl.c.