Re: Giving a user a database

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Giving a user a database
Дата
Msg-id 200311061253.04619.josh@agliodbs.com
обсуждение исходный текст
Ответ на Giving a user a database  ("Robert C. Mosher II" <mosher@andrews.edu>)
Список pgsql-novice
Robert,

> I need to give a user a single database that they will have full control
> over. I am assuming this means giving them ownership of the database,
> but I have no idea how to do that, even after looking through the manual
> and the mailing list archive. How do I give a user ownership of a
> database? Or if there's a better way of granting them full access
> (creating and editing tables, etc.) what is it, and how do I do it?

CREATE USER joe WITH PASSWORD 'jehosaphat' CREATEDB;
\c - joe
CREATE DATABASE joes_db;
\c - postgres
ALTER USER joe WITH NOCREATEDB;

then edit pg_hba.conf to have a line where joe can only connect to joes_db.

--
-Josh Berkus
 Aglio Database Solutions
 San Francisco


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

Предыдущее
От: "Robert C. Mosher II"
Дата:
Сообщение: Giving a user a database
Следующее
От: Boris Popov
Дата:
Сообщение: Help with "locking" please