Is there a way to reuse the cursor declaration in postgres.
For example : I have a function like below, I am trying to use the declaration of curs1 for curs2 is it possible ?
create or replace function vin_temp_test(k date,x varchar) RETURNS numeric[] AS $$
declare
curs1 CURSOR FOR select prod_name,sum(item_val) sum_value from temp_table group by prod_name;
curs2 cursor curs1;
begin
null
end;
$$ LANGUAGE plpgsql VOLATILE;