Re: grant problem - Mailing list pgsql-general

From Richard Huxton
Subject Re: grant problem
Date
Msg-id 424010DE.9020802@archonet.com
Whole thread Raw
In response to grant problem  (Rajarshi Mukherjee <mukherjee.rajarshi@gmail.com>)
List pgsql-general
Rajarshi Mukherjee wrote:
>  Hello all,
>
>  i have a function that updates a table. I gave execute grant on it to
>  a particular user but no grant on the table in question.
>
>  when logging in as that user and executing the function, i get an error
>  ERROR: permission denied for relation <table_name>
>
>  How can i ensure that any update on this table is only done through
>  that function, and that the function is oublicly executable?

Check the manuals for "CREATE FUNCTION" - particularly the section on
SECURITY INVOKER vs SECURITY DEFINER

--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: Szmutku Zoltán
Date:
Subject: Constraint problem
Next
From: Mike Rylander
Date:
Subject: Re: Exporting to XML