Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XAKL1-0004p8-Jo for pgsql-bugs@arkaria.postgresql.org; Thu, 24 Jul 2014 14:49:43 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XAKL1-0006WM-0b for pgsql-bugs@arkaria.postgresql.org; Thu, 24 Jul 2014 14:49:43 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XAKKz-0006TA-9v for pgsql-bugs@postgresql.org; Thu, 24 Jul 2014 14:49:41 +0000 Received: from sam.nabble.com ([216.139.236.26]) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XAKKw-0005Hq-7o for pgsql-bugs@postgresql.org; Thu, 24 Jul 2014 14:49:39 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1XAKKv-000836-DF for pgsql-bugs@postgresql.org; Thu, 24 Jul 2014 07:49:37 -0700 Date: Thu, 24 Jul 2014 07:49:37 -0700 (PDT) From: David G Johnston To: pgsql-bugs@postgresql.org Message-ID: <1406213377403-5812727.post@n5.nabble.com> In-Reply-To: <20140724132303.32098.66956@wrigleys.postgresql.org> References: <20140724132303.32098.66956@wrigleys.postgresql.org> Subject: Re: BUG #11031: Unexpected interval representations MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: 2.7 (++) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org marius.bauer wrote > The following bug has been logged on the website: > > Bug reference: 11031 > Logged by: Marius Bauer > Email address: > marius.bauer@ > PostgreSQL version: 9.3.3 > Operating system: Amazon RDS > Description: > > Please see following query and result: > > unitystg=> select a + b as sum, b - a as dif, 2 * a as pro, b / 2 as quo > from (select interval'1 day 15:45:25' as a, interval'2 days 12:34:56' as > b) > as foo; > sum | dif | pro | quo > -----------------+-----------------+-----------------+---------------- > 3 days 28:20:21 | 1 day -03:10:29 | 2 days 31:30:50 | 1 day 06:17:28 > (1 row) > > Usually I'd expect the day will be adjusted in those cases when the hour > is >>= 24 or < 0, but this does not happen. > > The interval value itself is correct, just the representation is > unexpected. Unexpected != Bug; this question belongs on -general See http://www.postgresql.org/docs/9.3/interactive/functions-datetime.html Justify_days Justify_hours David J. -- View this message in context: http://postgresql.1045698.n5.nabble.com/BUG-11031-Unexpected-interval-representations-tp5812713p5812727.html Sent from the PostgreSQL - bugs mailing list archive at Nabble.com. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs