Search Postgresql Archives

Revoking Function Execute Privilege

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux