以前为pgsql配置连接参数的时候:如果想设置所有网段所有用户md5连接如下:
IPv4网段:
host all all 0.0.0.0/0 md5
ipv6网段:
host all all ::/0 md5
自postgresql9.1发布之后,在9.1release说明文档里有这样一段话:
Support the key word all in the host column of pg_hba.conf (Peter Eisentraut)
Previously people used 0.0.0.0/0 or ::/0 for this
这说明:以上设置可合并为:host all all all md5 形式,这使得单一配置可支持不同网段,对我所在项目的一个应用帮助很大。