Search Postgresql Archives

Interval Division Workaround Suggestions (sub-day intervals only)?

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

 



Any suggestions on how to obtain the number of “X minute” intervals in “Y” where “Y” is always less than 24 hours?

 

e.g., : ‘05:00:00’::interval / ’00:06:00’::interval => 50 (integer)

 

I am guessing because intervals cover not-well-defined (variable) periods of times (i.e., months, years) that the definition of “divided into” is not stable enough implement a general division operator for.

 

 

From the Wiki:

 

http://wiki.postgresql.org/wiki/Working_with_Dates_and_Times_in_PostgreSQL

4. Multiplication and division of INTERVALS is under development and discussion at this time

It is suggested that you avoid it until implementation is complete or you may get unexpected results.

 

Thanks!

 

David J.


[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