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 1nsShr-0007Kc-OY for pgsql-bugs@arkaria.postgresql.org; Sat, 21 May 2022 17:15:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nsShq-0003Y1-JC for pgsql-bugs@arkaria.postgresql.org; Sat, 21 May 2022 17:15:58 +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 1nsShq-0003Xm-B9 for pgsql-bugs@lists.postgresql.org; Sat, 21 May 2022 17:15:58 +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 1nsShn-00073e-Mp for pgsql-bugs@lists.postgresql.org; Sat, 21 May 2022 17:15:57 +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 24LHFr4g721707; Sat, 21 May 2022 13:15:54 -0400 From: Tom Lane To: Andrey Lepikhov cc: pgsql-bugs@lists.postgresql.org Subject: Re: Negative value of numGroups In-reply-to: <26c0c627-65a9-9e38-07f0-56861b75fc68@postgrespro.ru> References: <1584431.1652801657@sss.pgh.pa.us> <26c0c627-65a9-9e38-07f0-56861b75fc68@postgrespro.ru> Comments: In-reply-to Andrey Lepikhov message dated "Thu, 19 May 2022 14:03:55 +0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <721705.1653153353.1@sss.pgh.pa.us> Date: Sat, 21 May 2022 13:15:53 -0400 Message-ID: <721706.1653153353@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andrey Lepikhov writes: > Next version of the patch. > As I see, now we trying to use Cardinality type instead of double. > So, I named casting routine as clamp_cardinality_to_long. Pushed with a bit of rewriting of comments etc. I left out the test case too, because (a) for me, it did not reveal any difference between patched and unpatched code, and (b) even if it had, it was far too expensive to put into the core regression tests. regards, tom lane