Revoking Function Execute Privilege - Mailing list pgsql-general

From David Johnston
Subject Revoking Function Execute Privilege
Date
Msg-id 027601cbcc69$095503f0$1bff0bd0$@yahoo.com
Whole thread Raw
Responses Re: Revoking Function Execute Privilege
List pgsql-general

I’ve executed the following in a clean database:

 

As postgres/superuser:

 

CREATE ROLE impotent NOLOGIN;

 

CREATE FUNCTION testfunc() RETURNS boolean AS $$

BEGIN

      RETURN true;

END;

$$ LANGUAGE 'plpgsql';

 

REVOKE ALL ON FUNCTION testfunc() FROM impotent;

 

SET ROLE impotent;

 

SELECT has_function_privilege('impotent','testfunc()','execute');

 

SELECT testfunc();

 

The has_function_privilege returns true instead of false and the SELECT testfunc() returns without an exception.

 

I expected failure due to the REVOKE ALL … FROM impotent so what am I missing?

 

Thanks,

 

David J

pgsql-general by date:

Previous
From: pasman pasmański
Date:
Subject: Logging planner estimates.
Next
From: Tom Lane
Date:
Subject: Re: Revoking Function Execute Privilege