postgres connection with port option in shell script

Поиск
Список
Период
Сортировка
От Abhra Kar
Тема postgres connection with port option in shell script
Дата
Msg-id CAFNULEd3cmKgN859g9N3xvTtYcxQYZxKdjGeeJ=WKRtiPL7_uw@mail.gmail.com
обсуждение исходный текст
Ответы Re: postgres connection with port option in shell script  (Andreas Kretschmer <andreas@a-kretschmer.de>)
Re: postgres connection with port option in shell script  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-general

Hi,

      I want to get postgres connection in script file. I am executing below command and successfully getting connected --- 


psql postgresql://$USER:$PASSWORD@$HOST/$DATABASE <<END


select * from abc;


This is executing with default 5432 port.If postgres is installed to any other port then port option need to be include here[Don't want to take port from .pgpass file].

How I can modify this command with PORT option.


Thanks 


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

Предыдущее
От: Melvin Davidson
Дата:
Сообщение: Re: Upgrading from Postgresql 9.1 to 10
Следующее
От: Andreas Kretschmer
Дата:
Сообщение: Re: postgres connection with port option in shell script