pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Nikita Glukhov <n.gluhov@postgrespro.ru>
Cc: Alexander Korotkov <aekorotkov@gmail.com>
Cc: Darafei Praliaskouski <me@komzpa.net>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Fedor Sigaev <teodor@sigaev.ru>
Subject: Re: compress method for spgist - 2
Date: Wed, 20 Sep 2017 18:34:47 -0400
Message-ID: <5454.1505946887@sss.pgh.pa.us> (raw)
In-Reply-To: <60e048d3-aa29-8289-5438-3b0c4c1d8d84@postgrespro.ru>
References: <54907069.1030506@sigaev.ru>
	<CAPpHfdsoy2bJMSTtvQySJ9zN2YJmzWJBLvdHV=ZvMOm6BR0UFg@mail.gmail.com>
	<20170920190059.1354.29457.pgcf@coridan.postgresql.org>
	<31999.1505938053@sss.pgh.pa.us>
	<CAPpHfduv0XZ_k+D3NoFMr=wFVM22D=wFZCMMswoLwBe2jAbuJw@mail.gmail.com>
	<60e048d3-aa29-8289-5438-3b0c4c1d8d84@postgrespro.ru>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Nikita Glukhov <n.gluhov@postgrespro.ru> writes:
> On 20.09.2017 23:19, Alexander Korotkov wrote:
>> On Wed, Sep 20, 2017 at 11:07 PM, Tom Lane <tgl@sss.pgh.pa.us 
>> <mailto:tgl@sss.pgh.pa.us>> 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 been 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.  Without this float-order-preserving 
> swapping
> one regression test for KNN with ORDER BY index will be totally broken 
> (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


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (41+ messages)  latest in thread

Message-ID: <5454.1505946887@sss.pgh.pa.us>
Permalink:  ../5454.1505946887@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/5454.1505946887@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, n.gluhov@postgrespro.ru, aekorotkov@gmail.com, me@komzpa.net, hlinnaka@iki.fi, teodor@sigaev.ru
  Subject: Re: compress method for spgist - 2
  In-Reply-To: <5454.1505946887@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