Re: Why do we have a database specification in .pgpass?

Kenneth Marshall <ktm@rice.edu>

From: Kenneth Marshall <ktm@rice.edu>
To: Dennis Bj??rklund <db@zigo.dhs.org>
Cc: Bruce Momjian <bruce@momjian.us>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2010-10-14T13:46:16Z
Lists: pgsql-hackers
On Thu, Oct 14, 2010 at 06:09:35AM +0200, Dennis Bj??rklund wrote:
> > We have a database specification in .pgpass:
> >
> > 	hostname:port:database:username:password
> >
> > What is the purpose of 'database' since username/password combinations
> > are global, not per database?  I would like to documents its purpose.
> 
> There is the GUC parameter db_user_namespace. Just for that you could
> probably  use dennis@foo as username instead, so maybe it's not the
> purpose. But I can't think of any other reason.
> 
> /Dennis
> 

This will allow the same user to save and use automatically different
passwords for each separate database.

Cheers,
Ken