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