Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dunbw-0002QB-Qc for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Sep 2017 22:36:52 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dunbw-0001tk-A5 for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Sep 2017 22:36:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dunaN-0007Sn-J0 for pgsql-hackers@postgresql.org; Wed, 20 Sep 2017 22:35:15 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dunaJ-0007p9-I6 for pgsql-hackers@postgresql.org; Wed, 20 Sep 2017 22:35:15 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v8KMYlAa005455; Wed, 20 Sep 2017 18:34:47 -0400 From: Tom Lane To: Nikita Glukhov cc: Alexander Korotkov , Darafei Praliaskouski , pgsql-hackers , Heikki Linnakangas , Fedor Sigaev Subject: Re: compress method for spgist - 2 In-reply-to: <60e048d3-aa29-8289-5438-3b0c4c1d8d84@postgrespro.ru> References: <54907069.1030506@sigaev.ru> <20170920190059.1354.29457.pgcf@coridan.postgresql.org> <31999.1505938053@sss.pgh.pa.us> <60e048d3-aa29-8289-5438-3b0c4c1d8d84@postgrespro.ru> Comments: In-reply-to Nikita Glukhov message dated "Thu, 21 Sep 2017 00:57:49 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <5453.1505946887.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 20 Sep 2017 18:34:47 -0400 Message-ID: <5454.1505946887@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Nikita Glukhov writes: > On 20.09.2017 23:19, Alexander Korotkov wrote: >> On Wed, Sep 20, 2017 at 11:07 PM, Tom Lane > > wrote: >>> Maybe I'm missing something, but it appears to me that it's >>> impossible for bbox->low.x to be NaN unless circle->center.x and/or >>> circle->radius is a NaN, in which case bbox->high.x would also have bee= n computed as a NaN, >>> making the swap entirely useless. > It is possible for bbox->low.x to be NaN when circle->center.x is and > circle->radius are both +Infinity.=C2=A0 Without this float-order-preserv= ing=20 > swapping > one regression test for KNN with ORDER BY index will be totally broken=20 > (you can > try it: https://github.com/glukhovn/postgres/tree/knn). If that's the reasoning, not having a comment explaining it is inexcusable. Do you really think people will understand what the code is doing? regards, tom lane --=20 Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers