Re: [BUGS] Re: Problems with avg on interval data type

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: [BUGS] Re: Problems with avg on interval data type
Дата
Msg-id Pine.LNX.4.30.0105190248311.900-100000@peter.localdomain
обсуждение исходный текст
Ответ на Re: Problems with avg on interval data type  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane writes:

> I suggest that the current code is more correct than you think ;-).
> ISTM it is a good idea to require a units field, or at least some
> punctuation giving a clue about units --- for example I do not object to
> '08:00' being interpreted as hours and minutes.  But I would be inclined
> to reject all four of the forms '+8', '-8', '8.0', and '8' as ambiguous.
> Is there something in the SQL spec that requires us to accept them?

Our interval is quite a bit different from the SQL version.  In SQL, an
interval value looks like this:

INTERVAL -'5 12:30:15.3' DAY TO SECOND

The unit qualifier is required.  Consequentially, I would reject anything
without units, except '0' maybe.

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Plans for solving the VACUUM problem
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Plans for solving the VACUUM problem