Re: Bug #756: suggestion: file with password instead of - Mailing list pgsql-bugs

From Reinhard Max
Subject Re: Bug #756: suggestion: file with password instead of
Date
Msg-id Pine.LNX.4.44.0209051835420.15752-100000@wotan.suse.de
Whole thread Raw
In response to Re: Bug #756: suggestion: file with password instead of  (Rod Taylor <rbt@zort.ca>)
List pgsql-bugs
On 5 Sep 2002 at 12:33, Rod Taylor wrote:

> My understanding is that it's a single password, not a list.
>
> As such you would probably not want a default, as each database you
> connect to will (should?) have a different password.  By setting a
> default file we may encourage users to use the same password
> throughout all PostgreSQL databases.

If a password file could only hold a single password, one would
constantly need to check and change the environmet variable when he
frequently changes between different databases and that would IMHO
withdraw most of the benefits of having such a file.

I would rather want to have a single file, that can hold multiple
entries and also allows commenting out entries. And why only put the
passwords into that file? The entries could be complete connection
info tuples including hostname, username, password, and maybe more
parameters, so that databases can be addressed by a nickname. I think
of something like

--- snip ---
foo password=foopass
bar hostname=foo.bar.com dbname=foodb user=max password=xyz
--- snap ---

So even the remote "bar" database could be accessed by a simple

$ psql bar


If there is still need to have the password file on another than the
default place, e.g. because the home directory is on NFS and thus
considered unsafe, the file format could simply allow some sort of
include command.

cu
    Reinhard

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Bug #756: suggestion: file with password instead of
Next
From: Bruce Momjian
Date:
Subject: Re: Bug #756: suggestion: file with password instead of