How does connect privilege works? - Mailing list pgsql-general

From Shridhar Daithankar
Subject How does connect privilege works?
Date
Msg-id 4884534.EvDx2JrGvE@bheem
Whole thread Raw
Responses Re: How does connect privilege works?  (Craig Ringer <ringerc@ringerc.id.au>)
Re: How does connect privilege works?  ("Albe Laurenz" <laurenz.albe@wien.gv.at>)
List pgsql-general

Hello,

 

I am trying to setup a cluster for trac databases and want to isolate each db, by assigning a specific user to a DB.

 

I followed the documentation but as shown in the following example, limiting access by connect does not seem to be working.

 

What am I missing?

 

------------

shridhar@bheem ~$ createuser testuser1

Shall the new role be a superuser? (y/n) n

Shall the new role be allowed to create databases? (y/n) y

Shall the new role be allowed to create more new roles? (y/n) y

 

shridhar@bheem ~$ createdb -O testuser1 testdb1

 

shridhar@bheem ~$ createdb testdb2

 

shridhar@bheem ~$ psql testdb2

psql (9.1.4)

Type "help" for help.

 

testdb2=# revoke connect ON database testdb2 FROM testuser1;

REVOKE

testdb2=# \q

shridhar@bheem ~$ psql -U testuser1 testdb2

psql (9.1.4)

Type "help" for help.

 

testdb2=> \q

 

 

shridhar@bheem ~$ psql test

psql (9.1.4)

Type "help" for help.

 

test=# select version();

version

---------------------------------------------------------------------------------------------------------

PostgreSQL 9.1.4 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.7.0 20120505 (prerelease), 64-bit

(1 row)

 

------------

--

Regards

Shridhar

pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: How to analyze load average ?
Next
From: Shridhar Daithankar
Date:
Subject: timestamp with timezone and time zone name