Alvaro Herrera a écrit :
> Cédric Villemain wrote:
>
>> Le jeudi 13 septembre 2007, Tom Lane a écrit :
>>
>>> =?ISO-8859-1?Q?St=E9phane_Schildknecht?=
>>>
>> <[EMAIL PROTECTED]> 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 roles
Role name | Superuser | Create role | Create DB | Connections | Member of
-----------+-----------+-------------+-----------+-------------+-----------
testrole | yes | no | no | no limit |
test=# alter role testrole nosuperuser;
ALTER ROLE
test=# \du
List of roles
Role name | Superuser | Create role | Create DB | Connections | Member of
-----------+-----------+-------------+-----------+-------------+-----------
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
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings