pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedNo default for (user-specific) service file location on Windows?
10+ messages / 3 participants
[nested] [flat]
Commits from this thread:
2022-05-19 1d8ef62f6e 08407c3f4e 54271c6dba b57e30c774 227c180efe 3a8d83cae3 Doc: clarify location of libpq's default service file on Windows.
* No default for (user-specific) service file location on Windows?
@ 2022-05-19 07:49 Dominique Devienne <ddevienne@gmail.com>
2022-05-19 08:17 ` Re: No default for (user-specific) service file location on Windows? Julien Rouhaud <rjuju123@gmail.com>
0 siblings, 1 reply; 10+ messages in thread
From: Dominique Devienne @ 2022-05-19 07:49 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
Hi,
The doc is explicit about defaults for the password file:
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: No default for (user-specific) service file location on Windows?
2022-05-19 07:49 No default for (user-specific) service file location on Windows? Dominique Devienne <ddevienne@gmail.com>
@ 2022-05-19 08:17 ` Julien Rouhaud <rjuju123@gmail.com>
2022-05-19 08:57 ` Re: No default for (user-specific) service file location on Windows? Dominique Devienne <ddevienne@gmail.com>
0 siblings, 1 reply; 10+ messages in thread
From: Julien Rouhaud @ 2022-05-19 08:17 UTC (permalink / raw)
To: Dominique Devienne <ddevienne@gmail.com>; +Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Hi,
On Thu, May 19, 2022 at 3:46 PM Dominique Devienne <ddevienne@gmail.com> wrote:
>
> The doc is explicit about defaults for the password file:
> From https://www.postgresql.org/docs/current/libpq-pgpass.html
> Linux: ~/.pgpass
> Windows: %APPDATA%\postgresql\pgpass.conf
>
> But for the service file OTOH, only the Linux default is documented:
> From: https://www.postgresql.org/docs/current/libpq-pgservice.html
> Linux: ~/.pg_service.conf
> Windows: N/A
>
> I tried the obvious %APPDATA%\postgresql\pg_service.conf, with no luck.
>
> So is this a lack in the documentation for the service file?
> Or is it instead a lack of symmetry in the implementations of these
> two mechanisms?
>
> If the latter, any chance the symmetry would be restored? (with
> corresponding doc update).
As far as I can see from the code it should be
%APPDATA%\postgresql\.pg_service.conf
Does this one work?
There is a discrepancy (apart from the documentation) as the default
file name is the same on Linux and Windows.
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: No default for (user-specific) service file location on Windows?
2022-05-19 07:49 No default for (user-specific) service file location on Windows? Dominique Devienne <ddevienne@gmail.com>
2022-05-19 08:17 ` Re: No default for (user-specific) service file location on Windows? Julien Rouhaud <rjuju123@gmail.com>
@ 2022-05-19 08:57 ` Dominique Devienne <ddevienne@gmail.com>
2022-05-19 09:52 ` Re: No default for (user-specific) service file location on Windows? Julien Rouhaud <rjuju123@gmail.com>
0 siblings, 1 reply; 10+ messages in thread
From: Dominique Devienne @ 2022-05-19 08:57 UTC (permalink / raw)
To: Julien Rouhaud <rjuju123@gmail.com>; +Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
On Thu, May 19, 2022 at 10:17 AM Julien Rouhaud <rjuju123@gmail.com> wrote:
> > Or is it instead a lack of symmetry in the implementations of these
> > two mechanisms?
>
> As far as I can see from the code it should be
> %APPDATA%\postgresql\.pg_service.conf
>
> Does this one work?
Yes it does! Thanks.
> There is a discrepancy (apart from the documentation) as the default
> file name is the same on Linux and Windows.
The doc is explicit about Windows for the password file,
probably should be for the service file as well IMHO.
It's unfortunate that the naming conventions are different.
Might need to be warned about in the doc too. My $0.02.
Could also be changed to try both on Windows, with or w/o the leading dot,
but I suspect this kind of change won't be considered worth implementing :).
Thanks again Julien, --DD
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: No default for (user-specific) service file location on Windows?
2022-05-19 07:49 No default for (user-specific) service file location on Windows? Dominique Devienne <ddevienne@gmail.com>
2022-05-19 08:17 ` Re: No default for (user-specific) service file location on Windows? Julien Rouhaud <rjuju123@gmail.com>
2022-05-19 08:57 ` Re: No default for (user-specific) service file location on Windows? Dominique Devienne <ddevienne@gmail.com>
@ 2022-05-19 09:52 ` Julien Rouhaud <rjuju123@gmail.com>
2022-05-19 14:11 ` Re: No default for (user-specific) service file location on Windows? Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 10+ messages in thread
From: Julien Rouhaud @ 2022-05-19 09:52 UTC (permalink / raw)
To: Dominique Devienne <ddevienne@gmail.com>; +Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
On Thu, May 19, 2022 at 10:57:55AM +0200, Dominique Devienne wrote:
> On Thu, May 19, 2022 at 10:17 AM Julien Rouhaud <rjuju123@gmail.com> wrote:
> > > Or is it instead a lack of symmetry in the implementations of these
> > > two mechanisms?
> >
> > As far as I can see from the code it should be
> > %APPDATA%\postgresql\.pg_service.conf
> >
> > Does this one work?
>
> Yes it does! Thanks.
Ah great!
> > There is a discrepancy (apart from the documentation) as the default
> > file name is the same on Linux and Windows.
>
> The doc is explicit about Windows for the password file,
> probably should be for the service file as well IMHO.
Yeah I totally agree. I'm attaching a patch for that.
> It's unfortunate that the naming conventions are different.
> Might need to be warned about in the doc too. My $0.02.
I agree that the discrepancy is annoying, but I don't think that we usually add
this kind of warning. I didn't do anything about it for now.
>
> Could also be changed to try both on Windows, with or w/o the leading dot,
> but I suspect this kind of change won't be considered worth implementing :).
We can't change the default file in older branches obviously, but I'd be a bit
worried about changing the default in the next major version either as it would
add unnecessary pain for users that do know and rely on the current default. I
guess we have to live with it, and properly document it.
Attachments:
v1-0001-Document-the-default-location-of-the-PGSERVICEFIL.patch (text/plain, 0B) download
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: No default for (user-specific) service file location on Windows?
2022-05-19 07:49 No default for (user-specific) service file location on Windows? Dominique Devienne <ddevienne@gmail.com>
2022-05-19 08:17 ` Re: No default for (user-specific) service file location on Windows? Julien Rouhaud <rjuju123@gmail.com>
2022-05-19 08:57 ` Re: No default for (user-specific) service file location on Windows? Dominique Devienne <ddevienne@gmail.com>
2022-05-19 09:52 ` Re: No default for (user-specific) service file location on Windows? Julien Rouhaud <rjuju123@gmail.com>
@ 2022-05-19 14:11 ` Tom Lane <tgl@sss.pgh.pa.us>
2022-05-19 15:53 ` Re: No default for (user-specific) service file location on Windows? Julien Rouhaud <rjuju123@gmail.com>
0 siblings, 1 reply; 10+ messages in thread
From: Tom Lane @ 2022-05-19 14:11 UTC (permalink / raw)
To: Julien Rouhaud <rjuju123@gmail.com>; +Cc: Dominique Devienne <ddevienne@gmail.com>; pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Julien Rouhaud <rjuju123@gmail.com> writes:
> We can't change the default file in older branches obviously, but I'd be a bit
> worried about changing the default in the next major version either as it would
> add unnecessary pain for users that do know and rely on the current default. I
> guess we have to live with it, and properly document it.
Yeah, agreed. Documentation fix seems like the way to go.
I do not like your proposed wording, as it seems way too dense.
Can't we avoid the parenthetical remarks (plural) inside a sub-clause?
You're asking the reader to keep track of about three levels of
interrupt.
Maybe just put the Windows info in a separate sentence:
... located at ~/.pg_service.conf</filename>.
On Microsoft Windows, it is located at
%APPDATA%\postgresql\.pg_service.conf, where %APPDATA% means the
Application Data subdirectory in the user's profile.
In either case, the location can be overridden by setting ...
ISTR there's precedent elsewhere for doing it about like that.
regards, tom lane
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: No default for (user-specific) service file location on Windows?
2022-05-19 07:49 No default for (user-specific) service file location on Windows? Dominique Devienne <ddevienne@gmail.com>
2022-05-19 08:17 ` Re: No default for (user-specific) service file location on Windows? Julien Rouhaud <rjuju123@gmail.com>
2022-05-19 08:57 ` Re: No default for (user-specific) service file location on Windows? Dominique Devienne <ddevienne@gmail.com>
2022-05-19 09:52 ` Re: No default for (user-specific) service file location on Windows? Julien Rouhaud <rjuju123@gmail.com>
2022-05-19 14:11 ` Re: No default for (user-specific) service file location on Windows? Tom Lane <tgl@sss.pgh.pa.us>
@ 2022-05-19 15:53 ` Julien Rouhaud <rjuju123@gmail.com>
2022-05-19 15:59 ` Re: No default for (user-specific) service file location on Windows? Julien Rouhaud <rjuju123@gmail.com>
0 siblings, 1 reply; 10+ messages in thread
From: Julien Rouhaud @ 2022-05-19 15:53 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Dominique Devienne <ddevienne@gmail.com>; pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
On Thu, May 19, 2022 at 10:11:06AM -0400, Tom Lane wrote:
> I do not like your proposed wording, as it seems way too dense.
> Can't we avoid the parenthetical remarks (plural) inside a sub-clause?
> You're asking the reader to keep track of about three levels of
> interrupt.
Yes, I was a bit unhappy with this wording.
> Maybe just put the Windows info in a separate sentence:
>
> ... located at ~/.pg_service.conf</filename>.
> On Microsoft Windows, it is located at
> %APPDATA%\postgresql\.pg_service.conf, where %APPDATA% means the
> Application Data subdirectory in the user's profile.
> In either case, the location can be overridden by setting ...
>
> ISTR there's precedent elsewhere for doing it about like that.
I'm fine with it. I still kept the default location full description in both
places as those end up in quite different part of the documentation, which
seems more helpful.
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: No default for (user-specific) service file location on Windows?
2022-05-19 07:49 No default for (user-specific) service file location on Windows? Dominique Devienne <ddevienne@gmail.com>
2022-05-19 08:17 ` Re: No default for (user-specific) service file location on Windows? Julien Rouhaud <rjuju123@gmail.com>
2022-05-19 08:57 ` Re: No default for (user-specific) service file location on Windows? Dominique Devienne <ddevienne@gmail.com>
2022-05-19 09:52 ` Re: No default for (user-specific) service file location on Windows? Julien Rouhaud <rjuju123@gmail.com>
2022-05-19 14:11 ` Re: No default for (user-specific) service file location on Windows? Tom Lane <tgl@sss.pgh.pa.us>
2022-05-19 15:53 ` Re: No default for (user-specific) service file location on Windows? Julien Rouhaud <rjuju123@gmail.com>
@ 2022-05-19 15:59 ` Julien Rouhaud <rjuju123@gmail.com>
2022-05-19 22:38 ` Re: No default for (user-specific) service file location on Windows? Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 10+ messages in thread
From: Julien Rouhaud @ 2022-05-19 15:59 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Dominique Devienne <ddevienne@gmail.com>; pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
On Thu, May 19, 2022 at 11:53:22PM +0800, Julien Rouhaud wrote:
> On Thu, May 19, 2022 at 10:11:06AM -0400, Tom Lane wrote:
> > I do not like your proposed wording, as it seems way too dense.
> > Can't we avoid the parenthetical remarks (plural) inside a sub-clause?
> > You're asking the reader to keep track of about three levels of
> > interrupt.
>
> Yes, I was a bit unhappy with this wording.
>
> > Maybe just put the Windows info in a separate sentence:
> >
> > ... located at ~/.pg_service.conf</filename>.
> > On Microsoft Windows, it is located at
> > %APPDATA%\postgresql\.pg_service.conf, where %APPDATA% means the
> > Application Data subdirectory in the user's profile.
> > In either case, the location can be overridden by setting ...
> >
> > ISTR there's precedent elsewhere for doing it about like that.
>
> I'm fine with it. I still kept the default location full description in both
> places as those end up in quite different part of the documentation, which
> seems more helpful.
This time with the patch.
Attachments:
v2-0001-Document-the-default-location-of-the-PGSERVICEFIL.patch (text/plain, 0B) download
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: No default for (user-specific) service file location on Windows?
2022-05-19 07:49 No default for (user-specific) service file location on Windows? Dominique Devienne <ddevienne@gmail.com>
2022-05-19 08:17 ` Re: No default for (user-specific) service file location on Windows? Julien Rouhaud <rjuju123@gmail.com>
2022-05-19 08:57 ` Re: No default for (user-specific) service file location on Windows? Dominique Devienne <ddevienne@gmail.com>
2022-05-19 09:52 ` Re: No default for (user-specific) service file location on Windows? Julien Rouhaud <rjuju123@gmail.com>
2022-05-19 14:11 ` Re: No default for (user-specific) service file location on Windows? Tom Lane <tgl@sss.pgh.pa.us>
2022-05-19 15:53 ` Re: No default for (user-specific) service file location on Windows? Julien Rouhaud <rjuju123@gmail.com>
2022-05-19 15:59 ` Re: No default for (user-specific) service file location on Windows? Julien Rouhaud <rjuju123@gmail.com>
@ 2022-05-19 22:38 ` Tom Lane <tgl@sss.pgh.pa.us>
2022-05-20 03:31 ` Re: No default for (user-specific) service file location on Windows? Julien Rouhaud <rjuju123@gmail.com>
0 siblings, 1 reply; 10+ messages in thread
From: Tom Lane @ 2022-05-19 22:38 UTC (permalink / raw)
To: Julien Rouhaud <rjuju123@gmail.com>; +Cc: Dominique Devienne <ddevienne@gmail.com>; pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Julien Rouhaud <rjuju123@gmail.com> writes:
> This time with the patch.
Pushed, with some minor twiddling to make the .pgpass and .pg_service.conf
descriptions more alike. I figured that the .pgpass docs are fine since
(surely) many more people have looked at those passages and not
complained, so I made sure that the service file descriptions were worded
comparably.
regards, tom lane
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: No default for (user-specific) service file location on Windows?
2022-05-19 07:49 No default for (user-specific) service file location on Windows? Dominique Devienne <ddevienne@gmail.com>
2022-05-19 08:17 ` Re: No default for (user-specific) service file location on Windows? Julien Rouhaud <rjuju123@gmail.com>
2022-05-19 08:57 ` Re: No default for (user-specific) service file location on Windows? Dominique Devienne <ddevienne@gmail.com>
2022-05-19 09:52 ` Re: No default for (user-specific) service file location on Windows? Julien Rouhaud <rjuju123@gmail.com>
2022-05-19 14:11 ` Re: No default for (user-specific) service file location on Windows? Tom Lane <tgl@sss.pgh.pa.us>
2022-05-19 15:53 ` Re: No default for (user-specific) service file location on Windows? Julien Rouhaud <rjuju123@gmail.com>
2022-05-19 15:59 ` Re: No default for (user-specific) service file location on Windows? Julien Rouhaud <rjuju123@gmail.com>
2022-05-19 22:38 ` Re: No default for (user-specific) service file location on Windows? Tom Lane <tgl@sss.pgh.pa.us>
@ 2022-05-20 03:31 ` Julien Rouhaud <rjuju123@gmail.com>
2022-05-20 06:50 ` Re: No default for (user-specific) service file location on Windows? Dominique Devienne <ddevienne@gmail.com>
0 siblings, 1 reply; 10+ messages in thread
From: Julien Rouhaud @ 2022-05-20 03:31 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Dominique Devienne <ddevienne@gmail.com>; pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
On Thu, May 19, 2022 at 06:38:46PM -0400, Tom Lane wrote:
> Julien Rouhaud <rjuju123@gmail.com> writes:
> > This time with the patch.
>
> Pushed, with some minor twiddling to make the .pgpass and .pg_service.conf
> descriptions more alike. I figured that the .pgpass docs are fine since
> (surely) many more people have looked at those passages and not
> complained, so I made sure that the service file descriptions were worded
> comparably.
Thanks a lot!
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: No default for (user-specific) service file location on Windows?
2022-05-19 07:49 No default for (user-specific) service file location on Windows? Dominique Devienne <ddevienne@gmail.com>
2022-05-19 08:17 ` Re: No default for (user-specific) service file location on Windows? Julien Rouhaud <rjuju123@gmail.com>
2022-05-19 08:57 ` Re: No default for (user-specific) service file location on Windows? Dominique Devienne <ddevienne@gmail.com>
2022-05-19 09:52 ` Re: No default for (user-specific) service file location on Windows? Julien Rouhaud <rjuju123@gmail.com>
2022-05-19 14:11 ` Re: No default for (user-specific) service file location on Windows? Tom Lane <tgl@sss.pgh.pa.us>
2022-05-19 15:53 ` Re: No default for (user-specific) service file location on Windows? Julien Rouhaud <rjuju123@gmail.com>
2022-05-19 15:59 ` Re: No default for (user-specific) service file location on Windows? Julien Rouhaud <rjuju123@gmail.com>
2022-05-19 22:38 ` Re: No default for (user-specific) service file location on Windows? Tom Lane <tgl@sss.pgh.pa.us>
2022-05-20 03:31 ` Re: No default for (user-specific) service file location on Windows? Julien Rouhaud <rjuju123@gmail.com>
@ 2022-05-20 06:50 ` Dominique Devienne <ddevienne@gmail.com>
0 siblings, 0 replies; 10+ messages in thread
From: Dominique Devienne @ 2022-05-20 06:50 UTC (permalink / raw)
To: Julien Rouhaud <rjuju123@gmail.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
On Fri, May 20, 2022 at 5:31 AM Julien Rouhaud <rjuju123@gmail.com> wrote:
> On Thu, May 19, 2022 at 06:38:46PM -0400, Tom Lane wrote:
> > Julien Rouhaud <rjuju123@gmail.com> writes:
> > Pushed, with some minor twiddling to make ... descriptions more alike.
> Thanks a lot!
And thank you both! --DD
^ permalink raw reply [nested|flat] 10+ messages in thread
end of thread, other threads:[~2022-05-20 06:50 UTC | newest]
Thread overview: 10+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-05-19 07:49 No default for (user-specific) service file location on Windows? Dominique Devienne <ddevienne@gmail.com>
2022-05-19 08:17 ` Julien Rouhaud <rjuju123@gmail.com>
2022-05-19 08:57 ` Dominique Devienne <ddevienne@gmail.com>
2022-05-19 09:52 ` Julien Rouhaud <rjuju123@gmail.com>
2022-05-19 14:11 ` Tom Lane <tgl@sss.pgh.pa.us>
2022-05-19 15:53 ` Julien Rouhaud <rjuju123@gmail.com>
2022-05-19 15:59 ` Julien Rouhaud <rjuju123@gmail.com>
2022-05-19 22:38 ` Tom Lane <tgl@sss.pgh.pa.us>
2022-05-20 03:31 ` Julien Rouhaud <rjuju123@gmail.com>
2022-05-20 06:50 ` Dominique Devienne <ddevienne@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox