More explicit documentation neede on "pgpass"

Started by PG Bug reporting formover 3 years ago6 messagesdocs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/14/libpq-pgpass.html
Description:

The subdirectory of $APPDATA$ should be stated explicitly in the
documentation. The choices are "\AppData\Local", "\AppData\LocalLow", and
"\AppData\Roaming". There is no good reason to make the user guess where to
create it when the address C:\Users\geoff\AppData is known and loved (but
obviously not the correct answer).

34.16. The Password File
The file .pgpass in a user's home directory can contain passwords to be used
if the connection requires a password (and no password has been specified
otherwise). On Microsoft Windows the file is named
%APPDATA%\postgresql\pgpass.conf (where %APPDATA% refers to the Application
Data subdirectory in the user's profile). Alternatively, the password file
to use can be specified using the connection parameter passfile or the
environment variable PGPASSFILE.

#2Laurenz Albe
laurenz.albe@cybertec.at
In reply to: PG Bug reporting form (#1)
Re: More explicit documentation neede on "pgpass"

On Mon, 2022-10-03 at 13:50 +0000, PG Doc comments form wrote:

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/14/libpq-pgpass.html
Description:

The subdirectory of $APPDATA$ should be stated explicitly in the
documentation. The choices are "\AppData\Local", "\AppData\LocalLow", and
"\AppData\Roaming".

The subdirectory *is* stated: it is "%APPDATA%\postgresql". You might have
to create that directory.

Yours,
Laurenz Albe

#3Julien Rouhaud
rjuju123@gmail.com
In reply to: PG Bug reporting form (#1)
Re: More explicit documentation neede on "pgpass"

Hi,

On Mon, Oct 03, 2022 at 01:50:26PM +0000, PG Doc comments form wrote:

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/14/libpq-pgpass.html
Description:

The subdirectory of $APPDATA$ should be stated explicitly in the
documentation. The choices are "\AppData\Local", "\AppData\LocalLow", and
"\AppData\Roaming". There is no good reason to make the user guess where to
create it when the address C:\Users\geoff\AppData is known and loved (but
obviously not the correct answer).

The documentation says %APPDATA%, not $APPDATA$. That's a system variable
that you can use in the explorer or a command prompt, that will tell you where
it the directory on your machine (you could alternatively look at Windows
documentation to get the same answer). It seems to have frequently changed
across Windows versions, which is why we can't document where it actually is.

#4Geoff Michaels
geoff@gmcl.com
In reply to: Julien Rouhaud (#3)
Re: More explicit documentation neede on "pgpass"

Thanks. I had missed the distinction between $APPDATA$ and %APPDATA%. I
will assume that I will find that %APPDATA% defaults to
...\APPDATA\ROAMING.

If one is inspired to try to "idiot-proof" the documentation, one could
insert the parenthetical expression "(typically \AppData\Roaming)" for
those that use Windows out of the box and are directed to bonafide
documentation that assumes a lot about the users.

--
Geoff Michaels, President
G. Michaels Consulting Ltd
Phone (866 or 780) 438-2101

*Prod me to add more DBDOC Techniques and News
<https://dbdocnews.blogspot.com/&gt;. *

*Join the DBDOC Interest Group
<https://www.linkedin.com/groups?gid=6528128&gt;. *

On Mon, Oct 3, 2022 at 9:11 AM Julien Rouhaud <rjuju123@gmail.com> wrote:

Show quoted text

Hi,

On Mon, Oct 03, 2022 at 01:50:26PM +0000, PG Doc comments form wrote:

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/14/libpq-pgpass.html
Description:

The subdirectory of $APPDATA$ should be stated explicitly in the
documentation. The choices are "\AppData\Local", "\AppData\LocalLow", and
"\AppData\Roaming". There is no good reason to make the user guess where

to

create it when the address C:\Users\geoff\AppData is known and loved (but
obviously not the correct answer).

The documentation says %APPDATA%, not $APPDATA$. That's a system variable
that you can use in the explorer or a command prompt, that will tell you
where
it the directory on your machine (you could alternatively look at Windows
documentation to get the same answer). It seems to have frequently changed
across Windows versions, which is why we can't document where it actually
is.

#5Julien Rouhaud
rjuju123@gmail.com
In reply to: Geoff Michaels (#4)
Re: More explicit documentation neede on "pgpass"

On Mon, Oct 03, 2022 at 09:25:58AM -0600, Geoff Michaels wrote:

Thanks. I had missed the distinction between $APPDATA$ and %APPDATA%. I
will assume that I will find that %APPDATA% defaults to
...\APPDATA\ROAMING.

If one is inspired to try to "idiot-proof" the documentation, one could
insert the parenthetical expression "(typically \AppData\Roaming)" for
those that use Windows out of the box and are directed to bonafide
documentation that assumes a lot about the users.

Current Windows documentation says for CSIDL_APPDATA / FOLDERID_RoamingAppData
at https://learn.microsoft.com/en-us/windows/win32/shell/csidl:

The file system directory that serves as a common repository for
application-specific data. A typical path is C:\Documents and
Settings\username\Application Data.

I was never able to find out what "typical" exactly mean. Is it something
configurable, or that can change at any point without any notice? I personally
don't think that trying to put some example value that may not be accurate for
the user is going to help, especially if that's not true on all currently
supported versions of Windows (and I don't know if that's the case, and even if
it's right now we will most certainly forget to update it the next time it
changes). Relying on dynamic variable resolution really seems like the best
thing to do.

#6Geoff Michaels
geoff@gmcl.com
In reply to: Julien Rouhaud (#5)
Re: More explicit documentation neede on "pgpass"

I appreciate and respect the efforts made here to help one simple user. The
Microsoft reference says it is valid up to Windows Vista, so it is an
excellent example of how things continue changing.

I would define, as an amateur, of course, "typical" to mean "the way it is
out of the box when you don't change it in the current version of Windows
released at least a year ago". We deal with a community of users that does
not customize Windows but uses it as it.

I fully expect that I will only encounter \AppData\Roaming but I know how
to find the right answer if I need a better one. Thanks, again, for
dedicated support and ideas.
--
Geoff Michaels, President
G. Michaels Consulting Ltd
Phone (866 or 780) 438-2101

*Prod me to add more DBDOC Techniques and News
<https://dbdocnews.blogspot.com/&gt;. *

*Join the DBDOC Interest Group
<https://www.linkedin.com/groups?gid=6528128&gt;. *

On Mon, Oct 3, 2022 at 10:10 AM Julien Rouhaud <rjuju123@gmail.com> wrote:

Show quoted text

On Mon, Oct 03, 2022 at 09:25:58AM -0600, Geoff Michaels wrote:

Thanks. I had missed the distinction between $APPDATA$ and %APPDATA%. I
will assume that I will find that %APPDATA% defaults to
...\APPDATA\ROAMING.

If one is inspired to try to "idiot-proof" the documentation, one could
insert the parenthetical expression "(typically \AppData\Roaming)" for
those that use Windows out of the box and are directed to bonafide
documentation that assumes a lot about the users.

Current Windows documentation says for CSIDL_APPDATA /
FOLDERID_RoamingAppData
at https://learn.microsoft.com/en-us/windows/win32/shell/csidl:

The file system directory that serves as a common repository for
application-specific data. A typical path is C:\Documents and
Settings\username\Application Data.

I was never able to find out what "typical" exactly mean. Is it something
configurable, or that can change at any point without any notice? I
personally
don't think that trying to put some example value that may not be accurate
for
the user is going to help, especially if that's not true on all currently
supported versions of Windows (and I don't know if that's the case, and
even if
it's right now we will most certainly forget to update it the next time it
changes). Relying on dynamic variable resolution really seems like the
best
thing to do.