From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Matt Zagrabelny <mzagrabe@d.umn.edu>
Cc: pgsql-general@postgresql.org >> PG-General Mailing List <pgsql-general@postgresql.org>
Subject: Re: psql profiles?
Date: Thu, 6 Dec 2018 19:23:18 -0300
Message-ID: <20181206222318.6jolbk3oscgbvb4c@alvherre.pgsql> (raw)
In-Reply-To: <CAOLfK3VvDo=mm9N_dxrYouwj4hN_izhMeaNU6gqRa9evTL7ORw@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: alvherre@2ndquadrant.com, mzagrabe@d.umn.edu
Subject: Re: psql profiles?
In-Reply-To: <20181206222318.6jolbk3oscgbvb4c@alvherre.pgsql>
References: <CAOLfK3VvDo=mm9N_dxrYouwj4hN_izhMeaNU6gqRa9evTL7ORw@mail.gmail.com> <20181206222318.6jolbk3oscgbvb4c@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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