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 1jjo0r-0000fE-30 for pgsql-hackers@arkaria.postgresql.org; Fri, 12 Jun 2020 18:02:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jjo0p-0004Ba-TA for pgsql-hackers@arkaria.postgresql.org; Fri, 12 Jun 2020 18:02:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jjo0p-0004BT-MA for pgsql-hackers@lists.postgresql.org; Fri, 12 Jun 2020 18:02:43 +0000 Received: from lungold.riddles.org.uk ([82.68.208.19]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jjo0m-0002Ia-Oz for pgsql-hackers@lists.postgresql.org; Fri, 12 Jun 2020 18:02:43 +0000 Received: from [192.168.127.1] (port=32246 helo=caithnard.riddles.org.uk) by lungold.riddles.org.uk with esmtp (Exim 4.92.3 (FreeBSD)) (envelope-from ) id 1jjo0k-000KEo-6t; Fri, 12 Jun 2020 18:02:38 +0000 Received: from localhost ([127.0.0.1]:31743 helo=caithnard.riddles.org.uk) by caithnard.riddles.org.uk with esmtp (Exim 4.93.0.4 (FreeBSD)) (envelope-from ) id 1jjo0j-000196-In; Fri, 12 Jun 2020 18:02:37 +0000 From: Andrew Gierth To: Tom Lane Cc: pgsql-hackers@lists.postgresql.org Subject: Re: Infinities in type numeric In-Reply-To: <663832.1591969316@sss.pgh.pa.us> (Tom Lane's message of "Fri, 12 Jun 2020 09:41:56 -0400") Message-ID: <87h7vg5fo9.fsf@news-spur.riddles.org.uk> References: <606717.1591924582@sss.pgh.pa.us> <87lfks5uwl.fsf@news-spur.riddles.org.uk> <663832.1591969316@sss.pgh.pa.us> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (berkeley-unix) Date: Fri, 12 Jun 2020 19:02:37 +0100 MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk >>>>> "Tom" == Tom Lane writes: [...] Tom> so that a finite value should never map to INT[64]_MIN, making it Tom> safe to do as you suggest. I agree that distinguishing +Inf from Tom> NaN is probably more useful than distinguishing it from the very Tom> largest class of finite values, so will do it as you suggest. Tom> Thanks! It would make sense to make sure there's a test case in which at least one value of all three of: a finite value much greater than 10^332, a +Inf, and a NaN were all present in the same sort, if there isn't one already. -- Andrew (irc:RhodiumToad)