Pavel Stehule <pavel.stehule@xxxxxxxxx> wrote: > CREATE OR REPLACE FUNCTION public.fx(i integer, OUT a text, OUT b text) > RETURNS SETOF record > LANGUAGE plpgsql > AS $function$ > BEGIN > RETURN QUERY SELECT 'foo'||id, 'bar'||id FROM generate_series(1,i) g(id); > RETURN; > END; > $function$ I'm afraid I will almost certainly be unable to use RETURN QUERY. I have just broken this down to the posted code to make it easier to understand. In my real world code a loop will need to iterate over features of a postgis geometry returning a couple of rows containing a string and a calculated geometry as a result. Regards Sven -- "Thinking of using NT for your critical apps? Isn't there enough suffering in the world?" (Advertisement of Sun Microsystems in Wall Street Journal) /me is giggls@ircnet, http://sven.gegg.us/ on the Web -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general