Hi, I'm making a function in pgsql to create and delete an user from the database, but in all the variant, I found an error. A simple example is create function DeleteUser (varchar) returns void as ' declare login alias for $1; begin drop user login; end ' language 'plpgsql' But always give an error. We can't manipulate roles in any function of pgsql? Sorry for my english and the question, but I'm a student yet! ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq