Re: psql profiles?

Поиск
Список
Период
Сортировка
От Matt Zagrabelny
Тема Re: psql profiles?
Дата
Msg-id CAOLfK3V1+wVqJe6x9QZqBHerb0N_D0XPGKzLpJng3AN7X+Gnkg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: psql profiles?  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: psql profiles?
Список pgsql-general


On Thu, Dec 6, 2018 at 4:24 PM Alvaro Herrera <alvherre@2ndquadrant.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

В списке pgsql-general по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: psql profiles?
Следующее
От:
Дата:
Сообщение: Importing tab delimited text file using phpPgAdmin 5.1 GUI