Consistency problem with unlabeled intervals - Mailing list pgsql-hackers

From Tom Lane
Subject Consistency problem with unlabeled intervals
Date
Msg-id 18363.1020375301@sss.pgh.pa.us
Whole thread Raw
List pgsql-hackers
In current sources:

regression=# select '60'::interval;interval
----------00:01
(1 row)

regression=# select '1.5'::interval; interval
-------------00:00:01.50
(1 row)

That is, '60' is read as so many hours, '1.5' is read as so many
seconds.  This seems a tad inconsistent.

7.2 does the same thing, 7.1 says
ERROR:  Bad interval external representation '60'
but takes '1.5' as meaning 1.5 seconds.

I'd prefer to standardize on a unit of seconds myself.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Per tuple overhead, cmin, cmax
Next
From: Jason Earl
Date:
Subject: Re: PostgreSQL mission statement?