简体   繁体   中英

Find PostgreSQL server hostname on which it runs

是否可以找到PostgreSQL服务器运行的主机?

Use SELECT inet_server_addr() , but it'll return NULL if connection is established via Unix-domain socket. And there's inet_server_port() which returns the port server is listening.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM