Обсуждение: Fwd: Bug#308535: postgresql-client: [psql] manual page does not document ~/.pgpass file
Hi PostgreSQL developers!
We recently got the bug report below. Do you agree that documenting
~/.pgpass in psql(1) is a good idea?
Thanks for considering and have a nice day!
Martin
----- Forwarded message from Jari Aalto <jari.aalto@cante.net> -----
Subject: Bug#308535: postgresql-client: [psql] manual page does not documen=
t ~/.pgpass file
Reply-To: Jari Aalto <jari.aalto@cante.net>, 308535@bugs.debian.org
From: Jari Aalto <jari.aalto@cante.net>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Date: Tue, 10 May 2005 23:26:00 +0300
X-Spam-Status: No, score=3D0.0 required=3D4.0 tests=3DAWL,BAYES_50 autolear=
n=3Dno=20
version=3D3.0.2
Package: postgresql-client
Version: 7.4.7-6
Severity: minor
psql(1) manual page does not mention in the FILES section ~/.pgpass file
and how it is used. It should include:=20
FILES
...
o The file ~/.pgpass in is a file that can contain passwords to be
used if the connection requires a password (and no password has
been specified otherwise). This file should have lines of the
following format:
hostname:port:database:username:password
Each of the first four fields may be a literal value, or *, which
matches anything. The password field from the first line that matches
the current connection parameters will be used. (Therefore, put
more-specific entries first when you are using wildcards.) If an entry
needs to contain : or \, escape this character with \.
The permissions on .pgpass must disallow any access to world or group;
achieve this by the command chmod 0600 ~/.pgpass. If the permissions
are less strict than this, the file will be ignored.
This explanation was exerpted from=20
http://www.postgresql.org/docs/7.4/static/libpq-pgpass.html
I have no idea why it is there, where nobidy is looking
----- End forwarded message -----
--=20
Martin Pitt http://www.piware.de
Ubuntu Developer http://www.ubuntulinux.org
Debian Developer http://www.debian.org
Martin Pitt <mpitt@debian.org> writes:
> We recently got the bug report below. Do you agree that documenting
> ~/.pgpass in psql(1) is a good idea?
On that theory we'd have to replicate large parts of the libpq
documentation on every one of the "client application" pages,
which doesn't seem very maintainable. (.pgpass is just the tip
of the iceberg; the "environment variables" and "SSL support"
pages are also pretty critical for users to know about.)
I agree that there needs to be some more prominent mention,
but this doesn't look like the way to do it. Maybe some
"see also" links?
regards, tom lane
Tom Lane wrote:
> Martin Pitt <mpitt@debian.org> writes:
> > We recently got the bug report below. Do you agree that documenting
> > ~/.pgpass in psql(1) is a good idea?
>
> On that theory we'd have to replicate large parts of the libpq
> documentation on every one of the "client application" pages,
> which doesn't seem very maintainable. (.pgpass is just the tip
> of the iceberg; the "environment variables" and "SSL support"
> pages are also pretty critical for users to know about.)
>
> I agree that there needs to be some more prominent mention,
> but this doesn't look like the way to do it. Maybe some
> "see also" links?
Have you looked at the current docs? 8.0.3 has this in the second
paragraph of the psql Usage section:
http://www.postgresql.org/docs/8.0/static/app-psql.html
It is also convenient to have a ~/.pgpass file to avoid regularly having
to type in passwords. See Section 27.12 for more information.
This was added in February:
revision 1.133
date: 2005/02/11 04:19:05; author: momjian; state: Exp; lines: +22 -15
Mention that some psql environment variables come from libpq and note
more variables can be found in the libpq manual section.
Mention .pgpass in the psql manual page section dealing with connection
parameters and point to the libpq section for more details.
Is that sufficient?
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
Maybe it would be a good idea to have a manual page called somelint like libpq-connect and document it there. The other man pages could then reference it. Best Wishes, Chris Travers
Hi! Tom Lane [2005-05-13 9:49 -0400]: > Martin Pitt <mpitt@debian.org> writes: > > We recently got the bug report below. Do you agree that documenting > > ~/.pgpass in psql(1) is a good idea? >=20 > On that theory we'd have to replicate large parts of the libpq > documentation on every one of the "client application" pages, > which doesn't seem very maintainable. (.pgpass is just the tip > of the iceberg; the "environment variables" and "SSL support" > pages are also pretty critical for users to know about.) >=20 > I agree that there needs to be some more prominent mention, > but this doesn't look like the way to do it. Maybe some > "see also" links? A prominent pointer (URL and hint to local documentation) would certainly be adequate then. Thanks and have a nice weekend! Martin --=20 Martin Pitt http://www.piware.de Ubuntu Developer http://www.ubuntulinux.org Debian Developer http://www.debian.org