Re: [SQL] sql wrapped plpgsql set returning function

2007-04-25 Thread Richard Albright
I narrowed it down further. Can someone explain the difference between passing array[...] and passing an array using an aggregate array function into the function? On Wed, 2007-04-25 at 14:45 -0400, Richard Albright wrote: > It turns out that the from subselect is causing the error in : > > sele

Re: [SQL] sql wrapped plpgsql set returning function

2007-04-25 Thread Richard Albright
It turns out that the from subselect is causing the error in : select getmovavg(aggarray(trade_date), aggarray(close_price), > '2004-01-20', 5) > from > ( select trade_date, close_price::numeric > from quotedata > where symbol='MSFT' > and trade_date > '2004-01-01' >

Re: [SQL] sql wrapped plpgsql set returning function

2007-04-25 Thread Tom Lane
Richard Albright <[EMAIL PROTECTED]> writes: > I have figured out my looping issue, but am having difficulty wrapping > my set returning plpgsql function getmovavgset with a getmovavg sql func > when i run the following: Hm, worksforme (see attached trivial example). What PG version are you using

[SQL] sql wrapped plpgsql set returning function

2007-04-25 Thread Richard Albright
I have figured out my looping issue, but am having difficulty wrapping my set returning plpgsql function getmovavgset with a getmovavg sql func when i run the following: select getmovavg(aggarray(trade_date), aggarray(close_price), '2004-01-20', 5) from ( select trade_date, close_price::n