Search Postgresql Archives

INTERVAL documentation bug?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I believe the documentation (Data Types section) is missing one INTERVAL "field":

    HOUR TO SECOND

http://www.postgresql.org/docs/8.4/static/datatype-datetime.html

The interval type has an additional option, which is to restrict the set of stored fields by writing one of these phrases:

    YEAR
    MONTH
    DAY
    HOUR
    MINUTE
    SECOND
    YEAR TO MONTH
    DAY TO HOUR
    DAY TO MINUTE
    DAY TO SECOND
    HOUR TO MINUTE
    MINUTE TO SECOND


It's actually supported:

test1=> create table tab1 ( iv interval hour to second );
CREATE TABLE
test1=> insert into tab1 values ( 'PT444H59M59S' );
INSERT 0 1
test1=> select * from tab1;
    iv
-----------
 444:59:59
(1 row)


Seb

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux