Re: Roles - SET ROLE Updated - Mailing list pgsql-patches

From Tom Lane
Subject Re: Roles - SET ROLE Updated
Date
Msg-id 22238.1121974859@sss.pgh.pa.us
Whole thread Raw
In response to Re: Roles - SET ROLE Updated  (Stephen Frost <sfrost@snowman.net>)
Responses Re: Roles - SET ROLE Updated
Re: Roles - SET ROLE Updated
List pgsql-patches
Another issue: I like the has_role() function and in fact think it needs
to come in multiple variants just like has_table_privilege and friends:

    has_role(name, name)
    has_role(name, oid)
    has_role(oid, name)
    has_role(oid, oid)
    has_role(name)        -- implicitly has_role(current_user, ...)
    has_role(oid)

However I'm a bit dubious about whether "has_role" isn't an invasion of
application namespace.  pg_has_role would be better, but we have the
(mis) precedent of has_table_privilege.  What do you think about calling
it "has_role_privilege"?

            regards, tom lane

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Roles - SET ROLE Updated
Next
From: Stephen Frost
Date:
Subject: Re: Roles - SET ROLE Updated