* Tom Lane ([EMAIL PROTECTED]) wrote:
> 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"?

I thought about that originally.  It seemed a bit long to me and I felt
that having the 'privilege' of a role wasn't quite the same as having a
'role', but honestly I'm not terribly picky and on reflection a role
*is* like other objects in the catalog (I originally hadn't considered
it such), so, that's fine with me...

has_role() was another reason I was thinking about having a seperate
function for 'is_member_of_role' which didn't pollute the cache, just a
side-note.

        Thanks,

                Stephen

Attachment: signature.asc
Description: Digital signature

Reply via email to