From: | Gregory Haase <haaseg(at)onefreevoice(dot)com> |
---|---|
To: | Rich Shepard <rshepard(at)appl-ecosys(dot)com> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Question About Roles |
Date: | 2014-07-02 15:06:15 |
Message-ID: | CAHA6QFQKJc6FYWHSc0a1G4yckiLRh=UtK9y=ARCfZ2QA1s5R4g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, Jul 2, 2014 at 7:50 AM, Rich Shepard <rshepard(at)appl-ecosys(dot)com>
wrote:
> On Wed, 2 Jul 2014, David G Johnston wrote:
>
> or if you want to do it as part of creating a new user:
>>
>> CREATE ROLE new_management_user
>> [other stuff here]
>> IN ROLE management;
>>
>> http://www.postgresql.org/docs/9.2/interactive/sql-createrole.html
>>
>
> David,
>
> I'll have to think deeply about what this is doing. Initially, I read it
> as assigning a new user's role to an existing group's role; that's the
> opposite of what I want.
>
> Thanks,
>
> Rich
>
>
If it made you feel better, remember that CREATE USER is an alias for
CREATE ROLE that includes LOGIN by default. So if you simply swap one word
in your command, the context becomes a little more clear for what you want:
CREATE USER new_management_user
[other stuff here]
IN ROLE management;
-Greg Haase
From | Date | Subject | |
---|---|---|---|
Next Message | sunpeng | 2014-07-02 15:42:16 | Re: Migration error " invalid byte sequence for encoding "UTF8": 0xff " from mysql 5.5 to postgresql 9.1 |
Previous Message | Arup Rakshit | 2014-07-02 15:02:36 | Re: How can I replace the year of the created_at column with the current year dynamically ? |