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

From Alvaro Herrera
Subject Re: alter user/role CURRENT_USER
Date
Msg-id 20150122214306.GJ1663@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
List pgsql-hackers
Looking at this a bit, I'm not sure completely replacing RoleId with a
node is the best idea; some of the users of that production in the
grammar are okay with accepting only normal strings as names, and don't
need all the CURRENT_USER etc stuff.  Maybe we need a new production,
say RoleSpec, and we modify the few productions that need the extra
flexibility?  For instance we could have ALTER USER RoleSpec instead of
ALTER USER RoleId.  But we would keep CREATE USER RoleId, because it
doesn't make any sense to accept CREATE USER CURRENT_USER.

I think that would lead to a less invasive patch also.

Am I making sense?

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



pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: basebackups during ALTER DATABASE ... SET TABLESPACE ... not safe?
Next
From: David G Johnston
Date:
Subject: Re: Proposal: knowing detail of config files via SQL