Re: creating users per database

Поиск
Список
Период
Сортировка
От Philippe Ferreira
Тема Re: creating users per database
Дата
Msg-id 43DB400D.8040102@worldonline.fr
обсуждение исходный текст
Ответ на creating users per database  (Karsten Hilbert <Karsten.Hilbert@gmx.net>)
Список pgsql-general
Hello,

I don't think you can create users *inside* a database, but for each
database,
you can create global users and make them members of a group having the same
name than your database.

Then, in pg_hba.conf, the folllowing line will give to your users the
permission to
connect to the database they belong :

    host    samegroup       all             0.0.0.0 0.0.0.0 md5

Bye,
Philippe Ferreira.

>Hi all,
>
>I have a faint memory of it being possible to create users
>"inside" *one* given database by way of a particular "create
>user" syntax along the lines of:
>
> create user newuser@thisdb ...;
>
>or similar.
>
>Was this ever possible in PostgreSQL or is my memory playing
>tricks on me ? I went back through the manuals all the way
>to 6.5 and searched archives.postgresql.com/Google, alas, to
>no avail.
>
>I am aware that I can (and should) restrict users to
>databases by way of pg_hba and friends.
>
>Karsten
>
>


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

Предыдущее
От: Andreas Kretschmer
Дата:
Сообщение: Re: SQL Lint
Следующее
От: Michael Glaesemann
Дата:
Сообщение: Re: mac os x compile failure