Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPBZo-0004b3-OA for pgsql-hackers@arkaria.postgresql.org; Thu, 05 Jan 2017 17:11:44 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cPBZo-0002mN-BD for pgsql-hackers@arkaria.postgresql.org; Thu, 05 Jan 2017 17:11:44 +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 1cPBZm-0002id-My; Thu, 05 Jan 2017 17:11:42 +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 1cPBZk-0000Pk-0H; Thu, 05 Jan 2017 17:11:41 +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 v05HBaR6006049; Thu, 5 Jan 2017 12:11:36 -0500 From: Tom Lane To: Vitaly Burovoy cc: Pantelis Theodosiou , web+postgresql@modin.io, pgsql-bugs@postgresql.org, pgsql-hackers@postgresql.org Subject: Re: Re: [BUGS][PATCH] BUG #14486: Inserting and selecting interval have different constraints In-reply-to: References: <20170104150301.10134.9126@wrigleys.postgresql.org> <5118.1483634907@sss.pgh.pa.us> Comments: In-reply-to Vitaly Burovoy message dated "Thu, 05 Jan 2017 09:06:11 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <6047.1483636296.1@sss.pgh.pa.us> Date: Thu, 05 Jan 2017 12:11:36 -0500 Message-ID: <6048.1483636296@sss.pgh.pa.us> X-Pg-Spam-Score: -5.1 (-----) 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 Vitaly Burovoy writes: > On 1/5/17, Tom Lane wrote: >> We could think about replacing interval2tm's output format with some >> other struct that uses a TimeOffset for hours and so cannot overflow. >> I'm not sure though how far the effects would propagate; it might be >> more work than we want to put into this. > If values with overflow are already in a database, what do you expect > a new output function should fix? My point is that ideally, any value that can physically fit into struct Interval ought to be considered valid. The fact that interval_out can't cope is a bug in interval_out, which ideally we would fix without artificially restricting the range of the datatype. Now, the problem with that of course is that it's not only interval_out but multiple other places. But your proposed patch also requires touching nearly everything interval-related, so I'm not sure it has any advantage that way over the less restrictive answer. 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