Re: Interval - incorrect grammar form

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Interval - incorrect grammar form
Дата
Msg-id 28147.1437104633@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Interval - incorrect grammar form  (Michael Paquier <michael.paquier@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Interval - incorrect grammar form
Следующее
От: Jeevan Chalke
Дата:
Сообщение: Re: [HACKERS] Grouping Sets: Fix unrecognized node type bug