Re: alter user/role CURRENT_USER - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: alter user/role CURRENT_USER
Date
Msg-id 20141113203513.GI1791@alvin.alvh.no-ip.org
Whole thread Raw
In response to Re: alter user/role CURRENT_USER  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Responses Re: alter user/role CURRENT_USER  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
List pgsql-hackers
Kyotaro HORIGUCHI wrote:

> - Storage for new information
> 
> The new struct NameId stores an identifier which telling what it
> logically is using the new enum NameIdTypes.

I think NameId is a bad name for this.  My point is that NameId, as it
stands, might be a name for anything, not just a role; and the object it
identifies is not an Id either.  Maybe RoleSpec?  Do we need a public_ok
argument to get_nameid_oid() (get a better name for this function too)
so that callers don't have to check for InvalidOid argument?  I think
the arrangement you propose is not very convenient; it'd be best to
avoid duplicating the check for InvalidOid in all callers of the new
function, particularly where there was no check before.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: group locking: incomplete patch, just for discussion
Next
From: Andres Freund
Date:
Subject: Re: group locking: incomplete patch, just for discussion