PostgreSQL servers control who they listen and talk too. You did well comparing the same script between machines, but you may be coming from different subnets, or any other difference which would tickle this behaviour.
On my box, this is controlled by the file /etc/postgresql/9.1/main/pg_hba.conf
-- hba stands for host-based access.
So you may have to talk to your DBA or sysadmin.
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.