Unix Technical Forum

Roles - SET ROLE Updated

This is a discussion on Roles - SET ROLE Updated within the Pgsql Patches forums, part of the PostgreSQL category; --> * Tom Lane (tgl@sss.pgh.pa.us) wrote: > Another issue: I like the has_role() function and in fact think it needs ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Patches

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #11 (permalink)  
Old 04-17-2008, 11:42 PM
Stephen Frost
 
Posts: n/a
Default Re: Roles - SET ROLE Updated

* Tom Lane (tgl@sss.pgh.pa.us) 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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFC3/4+rzgMPqB3kigRAkpmAJoD/M4JQYgh6UX9+fM19+m1BDlwDgCcCQMX
aNmyokkRykbd4TGGV2nzvN0=
=7Uj/
-----END PGP SIGNATURE-----

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 04-17-2008, 11:42 PM
Andrew Dunstan
 
Posts: n/a
Default Re: Roles - SET ROLE Updated



Tom Lane wrote:

>
>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"?
>
>
>
>


Do we need to follow a bad precedent for the sake of consistency? If
forced to choose, in general I would prefer to sacrifice consistency.

cheers

andrew (old Emersonian)



---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:33 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com