Re: [GENERAL] extracting total amount of time from an interval

2010-07-01 Thread A. Kretschmer
In response to Andrew Geery : > Is there a way to extract the total amount of time in a given unit from an > interval?  For example, I would like to know the total number of milliseconds > in an interval. > > The expression > > select extract('seconds' from '5 minutes'::interval) > > returns the

Re: [GENERAL] extracting total amount of time from an interval

2010-07-01 Thread Thom Brown
On 1 July 2010 12:53, Andrew Geery wrote: > Is there a way to extract the total amount of time in a given unit from an > interval?  For example, I would like to know the total number of > milliseconds in an interval. > The expression > select extract('seconds' from '5 minutes'::interval) > returns

[GENERAL] extracting total amount of time from an interval

2010-07-01 Thread Andrew Geery
Is there a way to extract the total amount of time in a given unit from an interval? For example, I would like to know the total number of milliseconds in an interval. The expression select extract('seconds' from '5 minutes'::interval) returns the value of the seconds field (0) in the interval;