pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: David Fetter <david@fetter.org>
Cc: Daniel Verite <daniel@manitou-mail.org>
Cc: PostgreSQL Development <pgsql-hackers@postgresql.org>
Cc: Vik Fearing <vik.fearing@2ndquadrant.com>
Subject: Re: popcount
Date: Mon, 18 Jan 2021 10:34:10 -0500
Message-ID: <338981.1610984050@sss.pgh.pa.us> (raw)
In-Reply-To: <e48355d3-efaf-e762-fffa-4b2191680292@enterprisedb.com>
References: <20201230105535.GJ13234@fetter.org>
	<5ea2932e-50f5-4a74-9550-5e3291b6652b@manitou-mail.org>
	<20201230164108.GK13234@fetter.org>
	<eb416bd3-9ee2-8a81-8cd4-d61baaf93ec2@enterprisedb.com>
	<20210111161354.GA8721@fetter.org>
	<e48355d3-efaf-e762-fffa-4b2191680292@enterprisedb.com>

Peter Eisentraut <peter.eisentraut@enterprisedb.com> 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





view thread (20+ messages)  latest in thread

Message-ID: <338981.1610984050@sss.pgh.pa.us>
Permalink:  ../338981.1610984050@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/338981.1610984050@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, peter.eisentraut@enterprisedb.com, david@fetter.org, daniel@manitou-mail.org, vik.fearing@2ndquadrant.com
  Subject: Re: popcount
  In-Reply-To: <338981.1610984050@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox