function privileges - Mailing list pgsql-novice

From Murat Tasan
Subject function privileges
Date
Msg-id 4D316E9D-7453-467F-812C-DD19B30F0D73@cwru.edu
Whole thread Raw
Responses Re: function privileges
Re: function privileges
List pgsql-novice
Quick question on function privileges: what exactly does GRANT/REVOKE
ON FUNCTION fun_name() actually do?

I've tried a few scenarios out, and cannot figure out when this is
used.  Let us say I have a function F(int4) that does some selection
on a table T.

If user A comes along and has no SELECT privileges on T, but has
EXECUTE privileges on F, A is not permitted to run the function, with
an error stating access to T is needed.

Now, if user B comes along and has SELECT privileges on T, but not
EXECUTE privileges on F, B is permitted to run the function.

I'm sure I'm missing some scenario where privileges on F make a
difference, but I can't find any info in the docs on this.  Can
anyone help me out understanding this?

Thanks!

Murat

pgsql-novice by date:

Previous
From: Darren R
Date:
Subject: Re: pg_dump - sort data?
Next
From: Michael Fuhr
Date:
Subject: Re: function privileges