Re: psql profiles?

From: Matt Zagrabelny <mzagrabe(at)d(dot)umn(dot)edu>
To: alvherre(at)2ndquadrant(dot)com
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:34:27
Message-ID: CAOLfK3V1+wVqJe6x9QZqBHerb0N_D0XPGKzLpJng3AN7X+Gnkg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Dec 6, 2018 at 4:24 PM Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
wrote:

> 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

Thanks Alvaro!

Is there any shorter version than:

psql "service=foo"

?

If not, I can make a shell alias that puts the "service=$@" into the
command.

Thanks again!

-m

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message s400t 2018-12-07 03:54:07 Importing tab delimited text file using phpPgAdmin 5.1 GUI
Previous Message Alvaro Herrera 2018-12-06 22:23:18 Re: psql profiles?