Re: Bug #756: suggestion: file with password instead of

From: Reinhard Max <max(at)suse(dot)de>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bug #756: suggestion: file with password instead of
Date: 2002-09-05 16:55:43
Message-ID: Pine.LNX.4.44.0209051835420.15752-100000@wotan.suse.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-patches

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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2002-09-05 19:00:50 Re: Bug #756: suggestion: file with password instead of
Previous Message Tom Lane 2002-09-05 16:50:01 Re: Bug #756: suggestion: file with password instead of

Browse pgsql-patches by date

  From Date Subject
Next Message Peter Eisentraut 2002-09-05 18:33:20 Re: [HACKERS] 7.3 Beta 1 Build Error on Cygwin
Previous Message Tom Lane 2002-09-05 16:50:01 Re: Bug #756: suggestion: file with password instead of