Re: [SQL] Function returning setof taking parameters from another table

2008-08-01 Thread Craig Ringer
Marcin Stępnicki wrote: > So far the only method I can think of is to use union all with > different parametrs, like: > > select * from f_test(123) > union all > select * from f_test(124) > union all > select * from f_test(125); > > But it is not flexible, I'd like to have parameters stored in a

[SQL] Function returning setof taking parameters from another table

2008-07-31 Thread Marcin Stępnicki
Hello. I've got a function which returns set of records: select * from f_test(123); param | val1 | val2 --- 123 | 1 | 17 123 | 2 | 18 I'd like to execute it multiple times with parameters from other query, like (it doesn't work of course): select *