Hello Dear list,
this is more a plpgsql dev. issue.It works on multiple rows.
I want to work on set of row and return set of row.
I am aware I could take as input/output array of range but I don't want (memory/casting cost).
Currently the function takes a cursor on a table and output a setof record.
I would like that the function can blend in multiple subqueries smoothly, as
WITH (
first query to get range),
(query computing union
),
(query using computed union
) etc.
Currently I have to execute 2 sql statment :
create cursor on ranges;
WITH (function to compute union)
,
,
(query...)
The only kind of function taking set of record as input I know of is aggregate function, but it returns only one row and the output of union can take multiple row.
Any insight would be greatly appreciated.
Cheers,
Rémi-C