Search Postgresql Archives

A function which returns all rolname from pg_roles.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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,



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux