Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPFlA-0004EE-Kx for pgsql-hackers@arkaria.postgresql.org; Thu, 05 Jan 2017 21:39: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 1cPFlA-0003rr-6Y for pgsql-hackers@arkaria.postgresql.org; Thu, 05 Jan 2017 21:39:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cPFl8-0003pR-8S; Thu, 05 Jan 2017 21:39:42 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cPFl5-00017W-3Z; Thu, 05 Jan 2017 21:39: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 v05LdYmY015459; Thu, 5 Jan 2017 16:39:34 -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> <6048.1483636296@sss.pgh.pa.us> Comments: In-reply-to Vitaly Burovoy message dated "Thu, 05 Jan 2017 11:46:28 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <15457.1483652374.1@sss.pgh.pa.us> Date: Thu, 05 Jan 2017 16:39:34 -0500 Message-ID: <15458.1483652374@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: >> 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. > Am I correct that we are still limited by ECPG which is limited by the > system "tm" struct? I'm not really that concerned about whether ECPG can deal with enormous intervals. If it bothers you, and you want to go fix it, more power to you --- but I think fixing the backend is much higher priority. > Also users who use a binary protocol can also use the "tm" struct and > can not expect overflow. If they store an enormous interval value, its really up to them not to choke on it when they read it back. Not our problem. > The docs say[1] the highest value of the interval type is 178_000_000 > years which is ... irrelevant really. That's talking about the largest possible value of the "months" field, viz (2^31-1)/12. Perhaps we ought to document the other field limits, but right now there's nothing there about how large the hours field can get. 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