Re: Interval - incorrect grammar form - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Interval - incorrect grammar form
Date
Msg-id 28147.1437104633@sss.pgh.pa.us
Whole thread Raw
In response to Re: Interval - incorrect grammar form  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-bugs
Michael Paquier <michael.paquier@gmail.com> writes:
> On Thu, Jul 16, 2015 at 4:56 PM, pinker <pinker@onet.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"

> 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).

Hm, "-1 mon" is probably better than "-1 mons", but it's somewhat
debatable; it's not clear to me that the convention about singular nouns
applies to negative quantities.  And if you were arguing from
native-language conventions then writing "mon" rather than "month"
already feels pretty unnatural.

I tend to agree that backwards compatibility outweighs any benefit
we'd get here.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Interval - incorrect grammar form
Next
From: Jeevan Chalke
Date:
Subject: Re: [HACKERS] Grouping Sets: Fix unrecognized node type bug