newbie : setting access for users in a web enviroment - Mailing list pgsql-general

From robert mena
Subject newbie : setting access for users in a web enviroment
Date
Msg-id 528f47680512231306m14252e04w6392863b668f81f@mail.gmail.com
Whole thread Raw
Responses Re: newbie : setting access for users in a web enviroment
List pgsql-general
Hi,

I am new to postgres but coming from a MySQL enviroment.

I am confused with the necessary steps to create users and restrict them to access/delete/insert/update data and create/delete/alter tables in a specific database.

I've created a database test and a user testadm

createdb test

createuser -D -P testadm
Enter password for new user:
Enter it again:
Shall the new user be allowed to create more new users? (y/n) n
CREATE USER

psql test
\du
                         List of users
   User name    | User ID |         Attributes         | Groups
----------------+---------+----------------------------+--------
 testadm |     100 |                            |
 postgres       |       1 | superuser, create database |

GRANT CREATE,REFERENCES ON DATABASE test TO testadm;

\z
Access privileges for database "test"
 Schema | Name | Type | Access privileges
--------+------+------+-------------------

How can I specify that the user testadm can perform those actions to this database?

Tks.

pgsql-general by date:

Previous
From: Michael Adler
Date:
Subject: Re: HINT: Perhaps out of disk space?
Next
From: "Qingqing Zhou"
Date:
Subject: Re: newbie : setting access for users in a web enviroment