summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-09-22 22:41:32 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-09-22 22:41:32 +0000
commitfb3428428330dde7d2757317c4a7ac4e7e9a2e9b (patch)
tree13ab16aeba5f4260c75d021dc91caba935a5e9a0 /sql
parent61ea910a5ba61a7c5eed2d679d1f25c431c449a8 (diff)
Fixes to user management
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2332 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'sql')
-rw-r--r--sql/modules/admin.sql10
1 files changed, 5 insertions, 5 deletions
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;