Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > Giving a user a database
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 15th April 21:55
mosher
External User
 
Posts: 1
Default Giving a user a database



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?

Thanks,
Rob Mosher.


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly
  Reply With Quote


  sponsored links


2 15th April 21:55
josh
External User
 
Posts: 1
Default Giving a user a database



Robert,


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


---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666