Return multiple results using dynamic sql (postgresql 8.2)
- by precose
I want to loop through schemas and get a result set that looks like this:
Count
5
834
345
34
984
However, I can't get it to return anything using dynamic sql...I've tried everything but 8.2 is being a real pain.
Here is my function:
CREATE OR REPLACE FUNCTION dwh.adam_test4()
RETURNS void
LANGUAGE plpgsql
AS $function$
DECLARE
myschema…