Skip site navigation (1) Skip section navigation (2)

managing access to database

From: tomislavb <tomica101(at)hotmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: managing access to database
Date: 2010-11-23 12:24:25
Message-ID: (view raw or whole thread)
Lists: pgsql-admin
Hi to all,

i've seen this is a popular topic but haven't found any concrete answers so
So my scenario is this :

- created a new user with :
sudo -u postgres createuser -D -A -P john

- created a new database with :
sudo -u postgres createdb -E 'UTF8' -O john test

- added plpgsql
sudo -u postgres createlang plpgsql test

After that i wanted to allow "external" access to the "test" database. 
So i tried configuring the pg_hba.conf file.
In my first attempt i added this line to pg_hba.conf:
host    all     john               md5
And john had connect access to access to all databases and admin access to
his "test" database.

After that i wanted give john admin access to his "test" db, and absolutely
no access to other databases.
host    test    john               md5

It doesnt work. Can't login through pg_admin.
I've played with revoking access to other databases, but to no avail.

I'm quite positive i'm not the first one with this issue.
There is a similar
thread  on the matter..

Any help would be very appreciated.

View this message in context:
Sent from the PostgreSQL - admin mailing list archive at


pgsql-admin by date

Next:From: Kevin GrittnerDate: 2010-11-23 14:48:10
Subject: Re: Postgres database : Out of balance problem from the same table
Previous:From: Achilleas MantziosDate: 2010-11-23 08:39:27
Subject: Re: FK disappeared in 8.3.3

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group