Re: psql profiles? - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: psql profiles?
Date
Msg-id 20181206222318.6jolbk3oscgbvb4c@alvherre.pgsql
Whole thread Raw
In response to psql profiles?  (Matt Zagrabelny <mzagrabe@d.umn.edu>)
Responses Re: psql profiles?
List 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


pgsql-general by date:

Previous
From: Matt Zagrabelny
Date:
Subject: psql profiles?
Next
From: Matt Zagrabelny
Date:
Subject: Re: psql profiles?