Re: pgpass hostname and IP address

From: Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: pgpass hostname and IP address
Date: 2018-03-10 06:17:40
Message-ID: cb405c65-210f-1a5e-e285-da08e096eb82@cox.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 03/09/2018 11:11 PM, Adrian Klaver wrote:
> On 03/09/2018 08:19 PM, Ron Johnson wrote:
>> (8.4 and 9.2, but soon to 9.6)
>>
>> If we sometimes access a db server by IP address, and sometimes by
>> hostname, must we have two entries for each server+user (one with the
>> hostname and the other with IP address), or is there a way to put them
>> both on the same line?
>>
>
> Not with .pgpass, though there is the service file method:
>
> https://www.postgresql.org/docs/9.6/static/libpq-pgservice.html
>
> https://www.postgresql.org/docs/10/static/libpq-connect.html#LIBPQ-CONNSTRING
>
> service
>
>     Service name to use for additional parameters. It specifies a service
> name in pg_service.conf that holds additional connection parameters. This
> allows applications to specify only a service name so connection
> parameters can be centrally maintained. See Section 33.16.

That looks promising.

--
Angular momentum makes the world go 'round.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message amitabh kumar 2018-03-10 06:49:02 Application Dependency/Limitations of Postgres Version Upgrade
Previous Message Adrian Klaver 2018-03-10 05:11:06 Re: pgpass hostname and IP address