Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1erc1J-0001WB-SJ for pgsql-hackers@arkaria.postgresql.org; Fri, 02 Mar 2018 04:10:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1erc1I-0004sh-N9 for pgsql-hackers@arkaria.postgresql.org; Fri, 02 Mar 2018 04:10:08 +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.89) (envelope-from ) id 1erbzT-0008Pn-8t for pgsql-hackers@lists.postgresql.org; Fri, 02 Mar 2018 04:08:15 +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.89) (envelope-from ) id 1erbzP-0005YS-RN for pgsql-hackers@postgreSQL.org; Fri, 02 Mar 2018 04:08:13 +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 w22486Rm018527; Thu, 1 Mar 2018 23:08:06 -0500 From: Tom Lane To: Andres Freund cc: Tomas Vondra , Mark Dilger , Alvaro Herrera , pgsql-hackers@postgreSQL.org Subject: Re: WIP: BRIN multi-range indexes In-reply-to: <20180302035538.gkqgtcv6kmn2cklw@alap3.anarazel.de> References: <20180123200537.gfx5hxcp5k5hktpe@alvherre.pgsql> <821c4c1d-592e-8916-e323-04607b11777e@2ndquadrant.com> <104E8BB8-35FF-4AA8-9871-6AFF04E4CAF3@gmail.com> <0afde2fc-e160-004f-8fe2-c65302ac3760@2ndquadrant.com> <22674.1517874015@sss.pgh.pa.us> <3e924a4c-6ca0-cc10-aebb-5004fc002800@2ndquadrant.com> <20180302035538.gkqgtcv6kmn2cklw@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Thu, 01 Mar 2018 19:55:38 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <18525.1519963686.1@sss.pgh.pa.us> Date: Thu, 01 Mar 2018 23:08:06 -0500 Message-ID: <18526.1519963686@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund writes: > On 2018-02-25 01:30:47 +0100, Tomas Vondra wrote: >> Note: Currently, this only works with float8-based data types. >> Supporting additional data types is not a big issue, but will >> require extending the opclass with "subtract" operator (used to >> compute distance between values when merging ranges). > Based on Tom's past stances I'm a bit doubtful he'd be happy with such a > restriction. Note that something similar-ish also has come up in > 0a459cec96. > I kinda wonder if there's any way to not have two similar but not equal > types of logic here? Hm. I wonder what the patch intends to do with subtraction overflow, or infinities, or NaNs. Just as with the RANGE patch, it does not seem to me that failure is really an acceptable option. Indexes are supposed to be able to index whatever the column datatype can store. regards, tom lane