Re: CREATE USER and createuser not working the same

Поиск
Список
Период
Сортировка
От Stéphane Schildknecht
Тема Re: CREATE USER and createuser not working the same
Дата
Msg-id 46FBA0F8.7040305@postgresqlfr.org
обсуждение исходный текст
Ответ на Re: CREATE USER and createuser not working the same  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-bugs
Alvaro Herrera a écrit :
> Cédric Villemain wrote:
>
>> Le jeudi 13 septembre 2007, Tom Lane a écrit :
>>
>>> Stéphane Schildknecht
>>>
>> <stephane.schildknecht@postgresqlfr.org> writes:
>>
>>>> It seems the shell command createuser and the SQL CREATE USER don't act
>>>> the same way,
>>>>
>>> They aren't really claimed to.
>>>
>> But the man say :
>> " createuser is a wrapper around the SQL command CREATE ROLE [create_role(7)].
>> There is no effective difference between creating users via this utility and
>> via other methods for accessing the server."
>>
>
> Note that CREATE ROLE behaves slightly differently from CREATE USER.
>
>
The result is exactly the same, here...

test=# create role testrole superuser;
CREATE ROLE
test=# \du                              List of rolesRole name | Superuser | Create role | Create DB | Connections |
Memberof 
-----------+-----------+-------------+-----------+-------------+-----------
testrole  | yes       | no          | no        | no limit    |
test=# alter role testrole nosuperuser;
ALTER ROLE
test=# \du                              List of rolesRole name | Superuser | Create role | Create DB | Connections |
Memberof 
-----------+-----------+-------------+-----------+-------------+-----------
testrole  | no        | no          | no        | no limit    |


So a superuser which has not been explicitly created with "createuser"
and "create DB" privileges will become a no privilege while losing the
status superuser.

If created with the Unix command createuser, he won't.

Best regards,

SAS


В списке pgsql-bugs по дате отправления:

Предыдущее
От: Hannu Valtonen
Дата:
Сообщение: Re: BUG #3639: queryplanner degrades to a sequential scan even if there's an index
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: Re: BUG #3638: UTF8 Character encoding does NOT work