[postgresql] Find the host name and port using PSQL commands