Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XAJ0I-0007nY-Fy for pgsql-bugs@arkaria.postgresql.org; Thu, 24 Jul 2014 13:24:14 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XAJ0H-0005Ny-R4 for pgsql-bugs@arkaria.postgresql.org; Thu, 24 Jul 2014 13:24:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XAJ0G-0005Nn-O6 for pgsql-bugs@postgresql.org; Thu, 24 Jul 2014 13:24:12 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XAJ07-0001rg-Ej for pgsql-bugs@postgresql.org; Thu, 24 Jul 2014 13:24:11 +0000 MIME-Version: 1.0 Subject: BUG #11031: Unexpected interval representations To: pgsql-bugs@postgresql.org From: marius.bauer@here.com Date: Thu, 24 Jul 2014 13:23:03 +0000 Message-ID: <20140724132303.32098.66956@wrigleys.postgresql.org> X-Pg-Spam-Score: 0.2 (/) Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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 The following bug has been logged on the website: Bug reference: 11031 Logged by: Marius Bauer Email address: marius.bauer@here.com 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. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs