Re: BUG #7498: Questionable interval parsing when in the form 'n m days'

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #7498: Questionable interval parsing when in the form 'n m days'
Дата
Msg-id 26220.1345076389@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #7498: Questionable interval parsing when in the form 'n m days'  (daniel@heroku.com)
Ответы Re: BUG #7498: Questionable interval parsing when in the form 'n m days'  (Daniel Farina <daniel@heroku.com>)
Список pgsql-bugs
daniel@heroku.com writes:
> select '1 5 hours'::interval = '1 day 5 hours'::interval;
>  ?column?
> ----------
>  t
> (1 row)

> I think that the first spelling, a unit-less '1', should not be accepted.

Not sure I agree.  The syntax '1 05:00' is required by spec to mean
'1 day 5 hours 0 minutes'.  I would take that to mean that a unitless
number directly to the left of an hours field is days.  Anyway, the
code in DecodeInterval is treating these cases the same.

            regards, tom lane

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Possible Bug in 9.2beta3
Следующее
От: Tom Lane
Дата:
Сообщение: Re: ProblemWithCharsOSX