INTERVAL documentation bug?

From: Sebastien FLAESCH <sf(at)4js(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: INTERVAL documentation bug?
Date: 2009-07-08 14:40:38
Message-ID: 4A54AFE6.5010106@4js.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Gould 2009-07-08 15:35:17 Client only install
Previous Message Scott Marlowe 2009-07-08 13:58:43 Re: "= Null" <> "is Null"?