Search Postgresql Archives

postgres connection with port option in shell script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux