On Fri, 2006-01-20 at 09:16 +0100, DB Subscriptions wrote: > BEGIN > CREATE USER NEW.userid WITH PASSWORD NEW.pword IN GROUP NEW.groupe; > > RETURN new; > END; You can't use PL/PgSQL variables in DDL commands. Try using EXECUTE: EXECUTE 'CREATE USER ' || NEW.userid || '...'; -Neil