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 1lNhn1-0008RS-Pi for pgsql-hackers@arkaria.postgresql.org; Sat, 20 Mar 2021 20:01:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lNhn0-0004rL-Je for pgsql-hackers@arkaria.postgresql.org; Sat, 20 Mar 2021 20:01:38 +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 1lNhmz-0004rD-LM for pgsql-hackers@lists.postgresql.org; Sat, 20 Mar 2021 20:01:38 +0000 Received: from forward1-smtp.messagingengine.com ([66.111.4.223]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lNhms-00060b-G3 for pgsql-hackers@postgresql.org; Sat, 20 Mar 2021 20:01:36 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailforward.nyi.internal (Postfix) with ESMTP id 18CA119400E1; Sat, 20 Mar 2021 16:01:29 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Sat, 20 Mar 2021 16:01:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=VcJfYcMZt0so8FOj1gnvqoRR1ofj/xHGGlevyaTDD sE=; b=JFgYz+RbSmHjLEoKfHFBxe1OT+ymxWHLDizelC0zamKCxWQj65RQyXglO WvJ97t7SxlnPJxSEh2mRR0OWTFsryHD4CLfwZONI2WUE27zTsIHfVWHCzN48PHBT du45K3vRjB49zgA1Fclox1ZXrQo0jRHawSg67yiqoYka3dNYQtAKJTH8nzj5EXN7 OvtZldMY1ztXLcn1J9m/taF4IvddZXRkPIJMjM50gd4lFjHhL3QFF31oUfMoxloh yHsdRpgmN4uVN5Ocl9Qfv+Gw6aFsLo25wSw0OaW/NQgghRxdQuvQs1PEVC8irO81 Ai27WajKb//KErATN7Agi2r5QzQKg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudegtddguddvjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefuvfhfhffkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvghnth gvrhhprhhishgvuggsrdgtohhmqeenucggtffrrghtthgvrhhnpeelveehheeuieduieet iedtkeeuteelfeetjeffieffudegvdffvdfftdeivdeukeenucfkphepkeejrddujeejrd eiledrudegtdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhr ohhmpehpvghtvghrrdgvihhsvghnthhrrghuthesvghnthgvrhhprhhishgvuggsrdgtoh hm X-ME-Proxy: Received: from laptop206oxuk.local (p57b1458c.dip0.t-ipconnect.de [87.177.69.140]) by mail.messagingengine.com (Postfix) with ESMTPA id 7F63F240311; Sat, 20 Mar 2021 16:01:27 -0400 (EDT) Subject: Re: popcount To: David Fetter , pgsql-hackers Cc: John Naylor References: <20201230105535.GJ13234@fetter.org> <5ea2932e-50f5-4a74-9550-5e3291b6652b@manitou-mail.org> <20201230164108.GK13234@fetter.org> <20210111161354.GA8721@fetter.org> <338981.1610984050@sss.pgh.pa.us> <20210119163818.GE8721@fetter.org> From: Peter Eisentraut Message-ID: <775b91fc-80fa-179d-bb20-0bf230e6db40@enterprisedb.com> Date: Sat, 20 Mar 2021 21:01:25 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 18.03.21 13:51, John Naylor wrote: > Hi David, > > Just a nitpick: > > +SET bytea_output TO hex; > > Since we don't see the string in the output, I don't immediately see the > reason to change the output format here? > > Aside from that, this patch works as expected, and is ready for committer. I have now read the entire internet on what a suitable name for this function could be. I think the emerging winner is BIT_COUNT(), which already exists in MySQL, and also in Python (int.bit_count()) and Java (Integer.bitCount()).