Revoking Function Execute Privilege

From: "David Johnston" <polobo(at)yahoo(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Revoking Function Execute Privilege
Date: 2011-02-14 17:03:00
Message-ID: 027601cbcc69$095503f0$1bff0bd0$@yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2011-02-14 17:17:22 Re: Revoking Function Execute Privilege
Previous Message Edwin Giraldo 2011-02-14 16:55:25