Re: Questions of the privileges to use the pg_cancel_backend and pg_terminate_backend function. Thanks. - Mailing list pgsql-general

From leaf_yxj
Subject Re: Questions of the privileges to use the pg_cancel_backend and pg_terminate_backend function. Thanks.
Date
Msg-id 1333560241895-5618473.post@n5.nabble.com
Whole thread Raw
In response to Re: Questions of the privileges to use the pg_cancel_backend and pg_terminate_backend function. Thanks.  (Aaron <aaron@chasingnuts.com>)
Responses Re: Re: Questions of the privileges to use the pg_cancel_backend and pg_terminate_backend function. Thanks.  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-general
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.

pgsql-general by date:

Previous
From: Thomas Kellerer
Date:
Subject: Re: views, queries, and locks
Next
From: Merlin Moncure
Date:
Subject: Re: PostgreSQL 8.4 crash on user defined C language function