Re: fomatting an interval

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: fomatting an interval
Дата
Msg-id 1998.1052797763@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: fomatting an interval  (nolan@celery.tssi.com)
Ответы Re: fomatting an interval
Список pgsql-general
Joseph Shraibman <joseph@xtenit.com> writes:
> playpen=# select start, finish, (finish-start),(finish-start)::interval(0) from timetable;
>            start          |         finish          |   ?column?   |   interval
> -------------------------+-------------------------+--------------+--------------
>   2003-05-12 21:37:44.933 | 2003-05-12 21:39:14.752 | 00:01:29.819 | 00:01:29.819
> (1 row)

[ blinks... ]  It works for me in CVS tip ... [ time passes... ]
You're right though, it's busted in 7.3.*, and this was the fix:

2003-01-08 19:58  tgl

    * src/include/catalog/pg_proc.h: Add missing pg_proc entry for
    interval_scale().  The lack of this entry causes interval rounding
    not to work as expected in 7.3, for example SELECT
    '18:17:15.6'::interval(0) does not round the value.  I did not
    force initdb, but one is needed to install the added row.

We could backpatch this into the 7.3 branch, but it would only help
people who recompiled *and* re-initdb'd from the 7.3.3 sources.  I
thought at the time it'd just create confusion to do that.  I'm willing
to listen to other opinions though ...

            regards, tom lane


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

Предыдущее
От: Joseph Shraibman
Дата:
Сообщение: Re: fomatting an interval (resend)
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: fomatting an interval