Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
目前我正在将客户端写入 PostgreSQL 服务器。我想列出在本地网络中运行 PostgreSQL 服务器的服务器的详细信息(IP 地址和端口号)。libpq 或 libpqxx 中有一些方法吗? 问候 德瓦拉·古达
PostgreSQL 支持“bonjour”,如果你的网络支持它并且 PostgreSQL 是用它构建的。
如果你没有那个,那么答案是否定的。您可以获得的最接近的方法是对 5432 上的网络进行端口扫描——但这仍然不会捕获其他端口上的侦听器。