Смотреть видео: postgresql - Find the host name and port using PSQL commands - Stack Overflow