Re: Interval - incorrect grammar form

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: pinker <pinker(at)onet(dot)eu>
Cc: PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Interval - incorrect grammar form
Date: 2015-07-17 02:39:23
Message-ID: CAB7nPqT2gbS2rz7do-LWEKstCbH6WmOaP8wFB3e1nTxUtxttog@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Jul 16, 2015 at 4:56 PM, pinker <pinker(at)onet(dot)eu> wrote:
> 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"

It behaves like this for ages, and there are some applications that
surely rely on the current behavior, so I am not sure that it is worth
changing now even if that's grammatically incorrect (native
English-speaker wanted here for confirmation).
Regards,
--
Michael

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2015-07-17 03:43:53 Re: Interval - incorrect grammar form
Previous Message tgpfeiffer 2015-07-17 01:41:56 BUG #13504: Types in math functions table is incorrect