Matthias,

> I don't understand why this function ist refused by postgresql with an parse 
error at the first $1 as ist every  
> other method I tryed to get postgres making an "alter group" with a 
variable. I'd be very happy if someone  
> could help...  

You can't substitute variables for object names.   If you need to construct 
dynamic query strings, use PL/pgSQL and EXECUTE:

sql_qry := ''ALTER GROUP '' || $group || '' ADD USER '' || $user;
EXECUTE sql_query;


-- 
-Josh Berkus
 Aglio Database Solutions
 San Francisco


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

Reply via email to