Re: INTERVAL SECOND limited to 59 seconds? - Mailing list pgsql-general

From Scott Bailey
Subject Re: INTERVAL SECOND limited to 59 seconds?
Date
Msg-id 4A13A653.8090702@comcast.net
Whole thread Raw
In response to Re: INTERVAL SECOND limited to 59 seconds?  (Sebastien FLAESCH <sf@4js.com>)
List pgsql-general
Sebastien FLAESCH wrote:
> Actually it's not limited to the usage of INTERVAL SECOND, I am writing
> a PostgreSQL driver for our 4GL virtual machine...
>
> I need to store all possible Informix INTERVAL types such as:
>
>    INTERVAL MONTH(8) TO MONTH
>    INTERVAL DAY(8) TO MINUTE
>    INTERVAL SECOND TO FRACTION(5)

In Postgres, you should just store it as an INTERVAL which (unlike some
other RDBMS') has the ability to store ranges from fractional seconds to
  thousands of years. Then if you need to output it in the above format,
make a view that splits the actual interval into month, minute and
fractional second pieces.

pgsql-general by date:

Previous
From: denis punnoose
Date:
Subject: Re: origins/destinations
Next
From: Thomas Guettler
Date:
Subject: Re: Get block of N numbers from sequence