From fb3428428330dde7d2757317c4a7ac4e7e9a2e9b Mon Sep 17 00:00:00 2001 From: einhverfr Date: Mon, 22 Sep 2008 22:41:32 +0000 Subject: Fixes to user management git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2332 4979c152-3d1c-0410-bac9-87ea11338e46 --- sql/modules/admin.sql | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sql') diff --git a/sql/modules/admin.sql b/sql/modules/admin.sql index 1055ff29..5e72a280 100644 --- a/sql/modules/admin.sql +++ b/sql/modules/admin.sql @@ -218,7 +218,7 @@ $$ language plpgsql; create or replace function admin__get_roles_for_user(in_user_id INT) returns setof text as $$ declare - u_role text; + u_role record; a_user users; begin select * into a_user from admin__get_user(in_user_id); @@ -240,7 +240,7 @@ create or replace function admin__get_roles_for_user(in_user_id INT) returns set r.oid = ar.roleid LOOP - RETURN NEXT u_role; + RETURN NEXT u_role.rolname; END LOOP; RETURN; @@ -463,7 +463,7 @@ $$ language sql; create or replace function admin__get_roles (in_database text) returns setof text as $$ DECLARE - v_rol text; + v_rol record; BEGIN FOR v_rol in SELECT @@ -474,7 +474,7 @@ BEGIN rolname ~ ('^lsmb_' || in_database) order by rolname ASC LOOP - RETURN NEXT v_rol; + RETURN NEXT v_rol.rolname; END LOOP; END; $$ language plpgsql; @@ -495,4 +495,4 @@ BEGIN END; $$ language plpgsql; -commit; \ No newline at end of file +commit; -- cgit v1.2.3