Hi Aaron: thanks. I tried the security definer. it works well as follows : CREATE FUNCTION kill_process(integer) RETURNS boolean AS 'select pg_cancel_backend($1);' LANGUAGE SQL SECURITY DEFINER; ---- One more question about this function : if non-super user get the execute this function, he/her will have privilege to kill all the processes which belong to the postgresql process. How can we avoid that happing. Thanks. Grace -- View this message in context: http://postgresql.1045698.n5.nabble.com/Questions-of-the-privileges-to-use-the-pg-cancel-backend-and-pg-terminate-backend-function-Thanks-tp5618129p5618473.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general