Re: BUG #16550: Problem with pg_service.conf

From: Christophe Pettus <xof(at)thebuild(dot)com>
To: Michał Lis <fcs1(at)poczta(dot)onet(dot)pl>
Cc: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #16550: Problem with pg_service.conf
Date: 2020-07-22 19:52:18
Message-ID: AD2DF4D2-260F-449B-8D3B-8A6022BE0C6C@thebuild.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

> On Jul 22, 2020, at 10:02, Michał Lis <fcs1(at)poczta(dot)onet(dot)pl> wrote:
>
> Copping the pg_service.conf to the client and setting the system variable to this file, rather has no sense.

Well, that's how the pg_service.conf file works; it is read by the client, not by the server:

https://www.postgresql.org/docs/12/libpq-pgservice.html

If you want the client to be able to log into the server without manually specifying credentials, you'll need to store those credentials (password, private key, etc.) somewhere on the client that the client program can access them. The service file is one way of doing that, as is the .pgpasswd file.

--
-- Christophe Pettus
xof(at)thebuild(dot)com

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Pavel Stehule 2020-07-22 21:18:54 Re: BUG #16549: "CASE" not work properly , the function works properly on PostgreSQL 9.6.8
Previous Message Michał Lis 2020-07-22 17:02:06 Re: BUG #16550: Problem with pg_service.conf