On Friday May 19 2006 12.04, Achilleus Mantzios wrote:
>
> SELECT u.usename from pg_user u,pg_group g where u.usesysid = any
> (g.grolist) and g.groname='osztatlan_users';
>

I'd like to make a function with this SQL:

CREATE FUNCTION kodok.group_users(group_name "varchar")
RETURNS SETOF "varchar" AS
$BODY$
SELECT pg_user.usename
FROM pg_user, pg_group
WHERE usesysid = any (pg_group.grolist) AND pg_group.groname=$1;
$BODY$
LANGUAGE 'sql' VOLATILE;

But I get the next error message:

ERROR:  return type mismatch in function declared to return character 
varying
DETAIL:  Actual return type is name.
CONTEXT:  SQL function "group_users"

At the moment, I don't understand what is the problem, and what I need 
to do now...?

Thanks,
kjt

____________________________________________________________________
Nagyobb szabadsαgra vαgysz? Tφrj ki a nιgy fal kφzόl!
Start ADSL elυfizetιsedhez az EuroWeb mostantσl havi 100 perc ingyenes WiFi 
hozzαfιrιst biztosνt szαmodra.
Rιszletek: www.freestart.hu


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to