Re: [GENERAL] table / query as a prameter for PL/pgSQL function

2011-08-09 Thread Merlin Moncure
2011/8/8 Ondrej Ivanič : > Hi, > > 2011/8/9 Merlin Moncure : >> You have a few of different methods for passing sets between functions. > > I do not want to pass data between functions. The ideal solution > should look like this: > select * from my_map_func() well, the method still applies: you'd

Re: [GENERAL] table / query as a prameter for PL/pgSQL function

2011-08-08 Thread Ondrej Ivanič
Hi, 2011/8/9 Merlin Moncure : > You have a few of different methods for passing sets between functions. I do not want to pass data between functions. The ideal solution should look like this: select * from my_map_func() > 1) refcursor as David noted.  reasonably fast. however, I find the > 'FETC

Re: [GENERAL] table / query as a prameter for PL/pgSQL function

2011-08-08 Thread Merlin Moncure
2011/8/7 Ondrej Ivanič : > Hi, > > It is possible to pass query result (or cursor?) as function > parameter? I need a function which emits zero or more rows per input > row (map function from map&reduce paradigm). Function returns record > (or array): (value1, value2, value3) > I've tried the follo

Re: [GENERAL] table / query as a prameter for PL/pgSQL function

2011-08-07 Thread David Johnston
On Aug 7, 2011, at 23:24, Ondrej Ivanič wrote: > Hi, > > It is possible to pass query result (or cursor?) as function > parameter? I need a function which emits zero or more rows per input > row (map function from map&reduce paradigm). Function returns record > (or array): (value1, value2, value

[GENERAL] table / query as a prameter for PL/pgSQL function

2011-08-07 Thread Ondrej Ivanič
Hi, It is possible to pass query result (or cursor?) as function parameter? I need a function which emits zero or more rows per input row (map function from map&reduce paradigm). Function returns record (or array): (value1, value2, value3) I've tried the following: 1) create or replace function t