How do I make this function work?  I am trying to get all the rolnames
from pg_roles.

CREATE OR REPLACE FUNCTION test() SETOF name AS $$
DECLARE
rrol  name;
BEGIN
SELECT rolname INTO rrol FROM pg_roles;
RETURN setof rrol;
END;
$$ LANGUAGE plpgsql;


regards,


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [EMAIL PROTECTED] so that your
       message can get through to the mailing list cleanly

Reply via email to