On Sun, 10 Feb 2002, Jon August wrote:
>
> That seems like a lot of work. . . and could become easily outdated. No?
>
> How about in pg_hba.conf? There's no way to say only user xyz can connect
> to database abc?
>
> I tried something like this in my pg_hba.conf, but now nobody can connect
> to it.
>
> local all password postgres
> host all xxx.xxx.xxx.xxx 255.255.255.255 password postgres
> local shopdb password mark
> host shopdb xxx.xxx.xxx.xxx 255.255.255.255 password mark
>
> I was hoping this config would permit user "postgres" to connect to any
> database, but limit user "mark" to shopdb.
The final argument goes to an external file in $PGDATA that lists users
(and optionally passwords) for the users that are allowed into the db.