Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l1WY0-0007ke-4h for pgsql-hackers@arkaria.postgresql.org; Mon, 18 Jan 2021 15:34:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l1WXy-0005oZ-0f for pgsql-hackers@arkaria.postgresql.org; Mon, 18 Jan 2021 15:34:26 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l1WXx-0005oL-Oj for pgsql-hackers@lists.postgresql.org; Mon, 18 Jan 2021 15:34:25 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l1WXt-0008Rr-Qz for pgsql-hackers@postgresql.org; Mon, 18 Jan 2021 15:34:24 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 10IFYAGH338982; Mon, 18 Jan 2021 10:34:10 -0500 From: Tom Lane To: Peter Eisentraut cc: David Fetter , Daniel Verite , PostgreSQL Development , Vik Fearing Subject: Re: popcount In-reply-to: References: <20201230105535.GJ13234@fetter.org> <5ea2932e-50f5-4a74-9550-5e3291b6652b@manitou-mail.org> <20201230164108.GK13234@fetter.org> <20210111161354.GA8721@fetter.org> Comments: In-reply-to Peter Eisentraut message dated "Mon, 18 Jan 2021 10:24:12 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <338980.1610984050.1@sss.pgh.pa.us> Date: Mon, 18 Jan 2021 10:34:10 -0500 Message-ID: <338981.1610984050@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Peter Eisentraut writes: > [ assorted nits ] At the level of bikeshedding ... I quite dislike using the name "popcount" for these functions. I'm aware that some C compilers provide primitives of that name, but I wouldn't expect a SQL programmer to know that; without that context the name seems pretty random and unintuitive. Moreover, it invites confusion with SQL's use of "pop" to abbreviate "population" in the statistical aggregates, such as var_pop(). Perhaps something along the lines of count_ones() or count_set_bits() would be more apropos. regards, tom lane