Re: How to create users for a login Role?

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: How to create users for a login Role?
Дата
Msg-id A737B7A37273E048B164557ADEF4A58B50FB7C7F@ntex2010i.host.magwien.gv.at
обсуждение исходный текст
Ответ на How to create users for a login Role?  (KhunSanAung <khunsanaung.gis@gmail.com>)
Список pgsql-admin
KhunSanAung wrote:
> I know how to create a login role for a postgres database.
> I used pgAdmin III to create login role and database.
> or via psql command;
> postgres=# CREATE ROLE dbuser PASSWORD 'secret' SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN;
> 
> 
> I'd like to know how to create users/members for each login role.
> How can I do it?
> I'd like to allow multiple users to access to a database.
> 
> I used postgres installed Ubuntu Server and access by pgAdmin III and SSH from Window OS.

I guess the problem here is a confusion over "user", "group" and "role".

In PostgreSQL, there is no difference between user and role.

A "group" is a role (usually with NOLOGIN), and a "user" is a role with LOGIN.
You add a "user" to a "group" by granting the "group" to the "user:

GRANT usergroup TO user1;

If you want to give a bunch of users a certain set of privileges,
grant the privileges to a NOLOGIN role and grant that role to the users.

Yours,
Laurenz Albe

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

Предыдущее
От: Nikolay Popov
Дата:
Сообщение: Re: Pacemaker dynamic membership
Следующее
От: Khaled McGonnell
Дата:
Сообщение: Can't install