Re: psql profiles?

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Matt Zagrabelny <mzagrabe(at)d(dot)umn(dot)edu>
Cc: "pgsql-general(at)postgresql(dot)org >> PG-General Mailing List" <pgsql-general(at)postgresql(dot)org>
Subject: Re: psql profiles?
Date: 2018-12-06 22:23:18
Message-ID: 20181206222318.6jolbk3oscgbvb4c@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2018-Dec-06, Matt Zagrabelny wrote:

> I'd rather do:
>
> psql foo
>
> and have it know that I connect to foo on host db-host-1.example.com.
>
> Is this possible with psql or do I hack together some wrapper script?

Sure, just define a pg_service.conf file.
https://www.postgresql.org/docs/11/libpq-pgservice.html

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Matt Zagrabelny 2018-12-06 22:34:27 Re: psql profiles?
Previous Message Matt Zagrabelny 2018-12-06 22:19:27 psql profiles?