Re: Question about Postgresql time fields(possible bug)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Question about Postgresql time fields(possible bug)
Дата
Msg-id 4050.1136927537@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Question about Postgresql time fields(possible bug)  (Dave Page <dpage@vale-housing.co.uk>)
Список pgsql-hackers
Dave Page <dpage@vale-housing.co.uk> writes:
> That's not really the point. The ISO 8601 standard allows midnight to be
> expressed as 00:00:00 or 24:00:00 to enable you to tell which midnight is
> being referred to (ie. The beginning or the end of the day).

There are other reasons for allowing it that have nothing to do with
that, either.  IIRC the argument that carried the day involved roundoff
behavior.  In 8.0 and before you can do this:

regression=# select '23:59:59.99'::time(0);  time
----------24:00:00
(1 row)

If you disallow 24:00:00 then there are legal values of time(n) that
will fail to round off to time(0).  What's worse, data that was accepted
and rounded off by prior releases will fail to reload after a dump.  It
was a complaint from a user who got burnt by that behavior that got us
thinking about it.
        regards, tom lane


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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: Question about Postgresql time fields(possible bug)
Следующее
От: Greg Stark
Дата:
Сообщение: Re: Improving N-Distinct estimation by ANALYZE