Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZFe2E-0002Wr-VH for pgsql-bugs@arkaria.postgresql.org; Thu, 16 Jul 2015 07:56:51 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZFe2E-00084x-CG for pgsql-bugs@arkaria.postgresql.org; Thu, 16 Jul 2015 07:56:50 +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) (envelope-from ) id 1ZFe1b-0007OY-Bk for pgsql-bugs@postgresql.org; Thu, 16 Jul 2015 07:56:11 +0000 Received: from mbob.nabble.com ([162.253.133.15]) by makus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZFe1U-0000WY-4E for pgsql-bugs@postgresql.org; Thu, 16 Jul 2015 07:56:09 +0000 Received: from msam.nabble.com (unknown [162.253.133.85]) by mbob.nabble.com (Postfix) with ESMTP id B4EF51145F97 for ; Thu, 16 Jul 2015 00:56:03 -0700 (PDT) Date: Thu, 16 Jul 2015 00:56:02 -0700 (MST) From: pinker To: pgsql-bugs@postgresql.org Message-ID: <1437033362097-5858132.post@n5.nabble.com> Subject: Interval - incorrect grammar form MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) 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 Hi, I've noticed that interval is shown incorrectly (in plural form) when date is negative: select age(timestamp '2015-09-01',timestamp '2017-10-02'); gives: "-2 years -1 *mons* -1 days" This mistake isn't present when date is positive select age(now(),'2015-06-07'); "1 *mon* 9 days 11:53:37.567851" It applies to versions: "PostgreSQL 9.4.1 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-55), 64-bit" and "PostgreSQL 8.4.17 on i486-pc-linux-gnu, compiled by GCC gcc-4.4.real (Debian 4.4.5-8) 4.4.5, 32-bit" -- View this message in context: http://postgresql.nabble.com/Interval-incorrect-grammar-form-tp5858132.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