Re: Questions of the privileges to use the pg_cancel_backend and pg_terminate_backend function. Thanks.

From: leaf_yxj <leaf_yxj(at)163(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Questions of the privileges to use the pg_cancel_backend and pg_terminate_backend function. Thanks.
Date: 2012-04-04 17:24:01
Message-ID: 1333560241895-5618473.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2012-04-04 17:37:16 Re: PostgreSQL 8.4 crash on user defined C language function
Previous Message Thomas Kellerer 2012-04-04 16:22:06 Re: views, queries, and locks