Hi,

I really need that a FUNCTION runs allways with this creator/owner permissions, and not with the user permission.

In other words, my FUNCTION must execute several procedures as POSTGRES superuser, and the tables its needs access/insert/delete/update has no permissions to normal user. Only calling my FUNCTION the normal user can do that, and never updating or deleting directly over the tables.

Any idea ?


---------------------------------
Marco Túlio Oliveira
IT-Manager
www.telecontrol.com.br







Hi,
 
I really need that a FUNCTION runs allways with 
this creator/owner permissions, and not with the user permission.
 
In other words, my FUNCTION must execute several 
procedures as POSTGRES superuser, and the tables its needs 
access/insert/delete/update has no permissions to normal user. Only calling my 
FUNCTION the normal user can do that, and never updating or deleting directly 
over the tables.
 
Any idea ?
 
 
---------------------------------Marco Túlio 
OliveiraIT-Managerwww.telecontrol.com.br
Sat, 25 Oct 2003 15:11:06 -0200
"Telecontrol Networking" <pglist@telecontrol.com.br>
Function Permissions
On Sat, Oct 25, 2003 at 15:11:06 -0200,
  Telecontrol Networking <pglist@telecontrol.com.br> wrote:
> Hi,
> 
> I really need that a FUNCTION runs allways with this creator/owner permissions, and not with the user permission.
> 
> In other words, my FUNCTION must execute several procedures as POSTGRES superuser, and the tables its needs access/insert/delete/update has no permissions to normal user. Only calling my FUNCTION the normal user can do that, and never updating or deleting directly over the tables.
> 
> Any idea ?

You can use security definer clause when creating the function.

Sat, 25 Oct 2003 13:18:03 -0500
Bruno Wolff III <bruno@wolff.to>
Re: Function Permissions
CREATE FUNCTION ... SECURITY DEFINER;

Read the 7.3 docs.

Chris

Telecontrol Networking wrote:

> 
> Hi,
>  
> I really need that a FUNCTION runs allways with this creator/owner 
> permissions, and not with the user permission.
>  
> In other words, my FUNCTION must execute several procedures as POSTGRES 
> superuser, and the tables its needs access/insert/delete/update has no 
> permissions to normal user. Only calling my FUNCTION the normal user can 
> do that, and never updating or deleting directly over the tables.
>  
> Any idea ?
>  
>  
> ---------------------------------
> Marco Tï¿½lio Oliveira
> IT-Manager
> www.telecontrol.com.br <http://www.telecontrol.com.br>


Sun, 26 Oct 2003 16:28:29 +0800
Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Re: Function Permissions