Search Postgresql Archives

Re: Fwd: Set-valued function in wrong context

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

 



On 09/10/2008 21:25, Stephan Szabo wrote:
> I think you'd end up wanting something like:
>  FROM ( select a * interval '1 minute' from generate_series(0, TotalMins,
> mins_delta) as s(a) ) as s(a)
> 
> I changed the concatenation and cast into an interval multiply, but you
> could easily do things the other way as well.

Great - thanks!

I also came up with the following after posting, when the brain finally
kicked into gear :-)

select start_time + cast(s.a::text || ' minutes' as interval)
from generate_series(0, TotalMins, mins_delta) as s(a)

Thanks for the help.

Ray.


------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@xxxxxx
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------


[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