Fwd: Bug#308535: postgresql-client: [psql] manual page does not document ~/.pgpass file

Started by Martin Pittalmost 21 years ago9 messagesbugsdocs
Jump to latest
#1Martin Pitt
mpitt@debian.org
bugsdocs

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 document ~/.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=0.0 required=4.0 tests=AWL,BAYES_50 autolearn=no
version=3.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:

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
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 -----

--
Martin Pitt http://www.piware.de
Ubuntu Developer http://www.ubuntulinux.org
Debian Developer http://www.debian.org

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Martin Pitt (#1)
bugsdocs
Re: Fwd: Bug#308535: postgresql-client: [psql] manual page does not document ~/.pgpass file

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

#3Martin Pitt
mpitt@debian.org
In reply to: Tom Lane (#2)
bugsdocs
Re: Fwd: Bug#308535: postgresql-client: [psql] manual page does not document ~/.pgpass file

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?

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?

A prominent pointer (URL and hint to local documentation) would
certainly be adequate then.

Thanks and have a nice weekend!

Martin

--
Martin Pitt http://www.piware.de
Ubuntu Developer http://www.ubuntulinux.org
Debian Developer http://www.debian.org

#4Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#2)
bugsdocs
Re: Fwd: Bug#308535: postgresql-client: [psql] manual page does

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
#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#4)
bugsdocs
Re: [BUGS] Fwd: Bug#308535: postgresql-client: [psql] manual page does not document ~/.pgpass file

Bruce Momjian <pgman@candle.pha.pa.us> writes:

It is also convenient to have a ~/.pgpass file to avoid regularly having
to type in passwords. See Section 27.12 for more information.

Is that sufficient?

It responds to the immediate complaint, but I was thinking that we ought
to add links to the relevant pages of the libpq docs in the "See Also"
parts of all of the client-application reference pages. If the links
read like "Client Environment Variables", "Client Password File", etc
then it seems to me this would let us remove the rather incomplete
information that is in the individual reference pages today.

regards, tom lane

#6Chris Travers
chris@travelamericas.com
In reply to: Bruce Momjian (#4)
bugsdocs
Re: Fwd: Bug#308535: postgresql-client: [psql] manual page

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

#7Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#5)
bugsdocs
Re: [BUGS] Fwd: Bug#308535: postgresql-client: [psql] manual

Tom Lane wrote:

Bruce Momjian <pgman@candle.pha.pa.us> writes:

It is also convenient to have a ~/.pgpass file to avoid regularly having
to type in passwords. See Section 27.12 for more information.

Is that sufficient?

It responds to the immediate complaint, but I was thinking that we ought
to add links to the relevant pages of the libpq docs in the "See Also"
parts of all of the client-application reference pages. If the links
read like "Client Environment Variables", "Client Password File", etc
then it seems to me this would let us remove the rather incomplete
information that is in the individual reference pages today.

Right, done for environment variables, and attached. PGPASSORD mentions
.pgpass so I think we are done.

-- 
  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

Attachments:

/bjm/difftext/plainDownload+21-3
#8Peter Eisentraut
peter_e@gmx.net
In reply to: Bruce Momjian (#7)
bugsdocs
Re: [BUGS] Fwd: Bug#308535: postgresql-client: [psql] manual

Bruce Momjian wrote:

Right, done for environment variables, and attached. PGPASSORD
mentions .pgpass so I think we are done.

Have you looked at the output this creates? The xref already creates
link text containing the section title. You don't need to write
"Environment variables" again.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

#9Bruce Momjian
bruce@momjian.us
In reply to: Peter Eisentraut (#8)
bugsdocs
Re: [BUGS] Fwd: Bug#308535: postgresql-client: [psql] manual

Peter Eisentraut wrote:

Bruce Momjian wrote:

Right, done for environment variables, and attached. PGPASSORD
mentions .pgpass so I think we are done.

Have you looked at the output this creates? The xref already creates
link text containing the section title. You don't need to write
"Environment variables" again.

I did look and I see:

http://developer.postgresql.org/docs/postgres/app-psql.html

Environment Variables (Section 27.11)

Is that how it should look? Should I be using different tags? I would
rather not show the numbers but I thought that was required when linking
from the ref pages to the main docs.

-- 
  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