On Mit, 22 Sep 1999, you wrote:
>>Hello!
>
>I wonder if I can grant access to two or more databases for one user, without
>letting others connect to the databases.
>
>Now I have the following entries in pg_hba.conf:
>
>-- cut --
>host sameuser 0.0.0.0 0.0.0.0 crypt
>host sameuser 0.0.0.0 0.0.0.0 crypt
>
>local template1 trust
>host template1 127.0.0.1 255.255.255.255 trust
>-- cut --
>
>So each user got access to one database, which equals to his username,
>but I found no possibility mentioned in the docs, which would allow an
>entry like this:
>
>host username dbname 0.0.0.0 0.0.0.0 crypt
>
>which would grant access to the database dbname for user username.
>Is there any possibility to do something like this?
AFAIK this isn't done in pg_hba.conf, but directly in the database. Per
default, new database users, which are not admins, have no rights on a
database (they can get a list of tables, but not their contents) unless the
creator of that db grants select, insert, etc rights to them or their group.
Bye...
Dirk
************