When you configure a PostgreSQL server, one of the first things you have to do is define remote access. By default, PostgreSQL does not accept remote connections. The important thing here is that PostgreSQL does not even reject the connection because it simply does not listen on the port. If you try to connect, the error message will actually come from the operating system because PostgreSQL does not care at all.
Assuming that there is a database server using the default configuration on 192.168.0.123, the following will happen:
iMac:~ hs$ telnet 192.168.0.123 5432 Trying 192.168.0.123... telnet: connect to address 192.168.0.123: Connection refused telnet: Unable to connect to remote host
Telnet ...