pg_hba.conf 和 pg_ident.conf 都允许对用户名进行正则表达式匹配。 pg_hba.conf 还支持对数据库名称进行正则表达式匹配。
pg_hba.conf
pg_ident.conf