[DOCS] CREATE USER
Hi, I just notice that when you create a user using CREATE USER and give the user the ability to create other users it gets created as SUPERUSER. CREATE ROLE behaves as expected. Looking at src/backend/parser/gram.y seems it's intentional, for backwards compatibility. But the docs says: """ CREATE USER is now an alias for CREATE ROLE. The only difference is that when the command is spelled CREATE USER, LOGIN is assumed by default, whereas NOLOGIN is assumed when the command is spelled CREATE ROLE. """ So, at least, we need to update docs or is undocumented intentionally too? also i really think the command should raise a WARNING so we now what's happening -- Jaime Casanova www.2ndQuadrant.com Professional PostgreSQL: Soporte 24x7 y capacitación -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs
Re: [DOCS] CREATE USER
Jaime Casanova writes: > I just notice that when you create a user using CREATE USER and give > the user the ability to create other users it gets created as > SUPERUSER. Are you talking about the CREATEUSER option? That is documented, quite clearly I think: CREATEUSER NOCREATEUSER These clauses are an obsolete, but still accepted, spelling of SUPERUSER and NOSUPERUSER. Note that they are not equivalent to CREATEROLE as one might naively expect! The only way we could really make this any better is to remove these keywords, which might be something to consider. The preferred SUPERUSER spelling has been accepted since 8.1 ... is that long enough to ensure everyone's converted their client-side tools? Probably not :-( regards, tom lane -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs
Re: [DOCS] CREATE USER
On Fri, Dec 9, 2011 at 10:21 PM, Tom Lane wrote: > Jaime Casanova writes: >> I just notice that when you create a user using CREATE USER and give >> the user the ability to create other users it gets created as >> SUPERUSER. > > Are you talking about the CREATEUSER option? That is documented, quite > clearly I think: > yes, i was. and it's seems you're right is documented... obviously i was looking at the wrong place > > The only way we could really make this any better is to remove these > keywords, which might be something to consider. The preferred SUPERUSER > spelling has been accepted since 8.1 ... is that long enough to ensure > everyone's converted their client-side tools? Probably not :-( > 6 years since enough for me... actually i have been around even before that and didn't remember that. even if you think is not worth remove these, even a WARNING should be good -- Jaime Casanova www.2ndQuadrant.com Professional PostgreSQL: Soporte 24x7 y capacitación -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs