Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 3671B1B745DC for ; Thu, 10 Nov 2011 23:26:43 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 50032-02 for ; Fri, 11 Nov 2011 03:26:37 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from mail-gx0-f174.google.com (mail-gx0-f174.google.com [209.85.161.174]) by mail.postgresql.org (Postfix) with ESMTP id 49CD81B745DB for ; Thu, 10 Nov 2011 23:26:37 -0400 (AST) Received: by ggnb2 with SMTP id b2so3752538ggn.19 for ; Thu, 10 Nov 2011 19:26:37 -0800 (PST) Received: by 10.101.6.3 with SMTP id j3mr4677400ani.49.1320981997629; Thu, 10 Nov 2011 19:26:37 -0800 (PST) Received: from ayaki.localdomain (office1.postnewspapers.com.au. [150.101.171.128]) by mx.google.com with ESMTPS id h24sm10510744ani.18.2011.11.10.19.26.35 (version=SSLv3 cipher=OTHER); Thu, 10 Nov 2011 19:26:37 -0800 (PST) Message-ID: <4EBC95AA.9050407@ringerc.id.au> Date: Fri, 11 Nov 2011 11:25:30 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110930 Thunderbird/7.0.1 MIME-Version: 1.0 To: John R Pierce CC: pgsql-bugs@postgresql.org Subject: Re: BUG #6290: converting interval from weeks to days References: <201111102115.pAALFOrw006489@wwwmaster.postgresql.org> <4EBC7BDD.3080609@hogranch.com> In-Reply-To: <4EBC7BDD.3080609@hogranch.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201111/89 X-Sequence-Number: 31684 On 11/11/2011 09:35 AM, John R Pierce wrote: > On 11/10/11 1:15 PM, Alexey Nalbat wrote: >> => select '1000000000 weeks'::interval; >> interval >> ------------------ >> -1589934592 days > > a billion weeks is like 19 million years. somehow, I don't think that > postgresql's date math has quite that range. It should probably detect overflow and fail with an error like Pg does with other overflow conditions, though. I think that was probably the point. -- Craig Ringer