Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dupAg-0000Qq-63 for pgsql-hackers@arkaria.postgresql.org; Thu, 21 Sep 2017 00:16:50 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dupAf-0000Gt-Ot for pgsql-hackers@arkaria.postgresql.org; Thu, 21 Sep 2017 00:16:49 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dup95-0005Yz-Pq for pgsql-hackers@postgresql.org; Thu, 21 Sep 2017 00:15:11 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dup8z-0002Am-0k for pgsql-hackers@postgresql.org; Thu, 21 Sep 2017 00:15:10 +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 v8L0Ekm4009464; Wed, 20 Sep 2017 20:14:46 -0400 From: Tom Lane To: Alexander Korotkov cc: =?UTF-8?Q?Darafei_Kom=D1=8Fpa_Praliaskouski?= , Nikita Glukhov , pgsql-hackers , Heikki Linnakangas , Fedor Sigaev Subject: Re: compress method for spgist - 2 In-reply-to: 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 Alexander Korotkov message dated "Thu, 21 Sep 2017 02:27:50 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <9462.1505952885.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Wed, 20 Sep 2017 20:14:45 -0400 Message-ID: <9463.1505952885@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 Alexander Korotkov writes: > On Thu, Sep 21, 2017 at 2:06 AM, Darafei "Komяpa" Praliaskouski < > me@komzpa.net> wrote: >> What is rationale behind this circle? > I would prefer to rather forbid any geometries with infs and nans. > However, then upgrade process will suffer. User with such geometries would > get errors during dump/restore, pg_upgraded instances would still contain > invalid values... Yeah, that ship has sailed unfortunately. >> It seems to me that any circle with radius of any Infinity should become a >> [-Infinity .. Infinity, -Infinity .. Infinity] box.Then you won't have >> NaNs, and index structure shouldn't be broken. > We probably should produce [-Infinity .. Infinity, -Infinity .. Infinity] > box for any geometry containing inf or nan. Hm, we can do better in at least some cases, eg for a box ((0,1),(1,inf)) there's no reason to give up our knowledge of finite bounds for the other three boundaries. But certainly for a NaN circle radius what you suggest seems the most sensible thing to do. 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