Re: fomatting an interval - Mailing list pgsql-general

From Tom Lane
Subject Re: fomatting an interval
Date
Msg-id 1998.1052797763@sss.pgh.pa.us
Whole thread Raw
In response to Re: fomatting an interval  (nolan@celery.tssi.com)
Responses Re: fomatting an interval
List 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 by date:

Previous
From: Joseph Shraibman
Date:
Subject: Re: fomatting an interval (resend)
Next
From: Alvaro Herrera
Date:
Subject: Re: fomatting an interval