Postgresql – Is it possible to insert multiple IP addresses in a single entry in a pg_hba.conf file

pg-hba.confpostgresql

Let's say I have the following
3 child IP addresses – 192.168.10.15 ,192.168.10.41 and 192.168.10.81
1 master IP address – 192.168.10.37
I want the 3 child IP addresses to be able to access the master IP address. Now, in order to do this, the pg_hba.conf file of the Master must contain an entry for each of the child IP addresses.
My question is instead of having 3 separate entries like this,

host  all  all  192.168.10.15/32  md5  
host  all  all  192.168.10.41/32  md5  
host  all  all  192.168.10.81/32  md5  

Can it have 1 entry for all 3, something like

host  all  all  192.168.10.15/32,192.168.10.41/32,192.168.10.81/32  md5

I tried the above method but none of the 3 IPs got the access. Is it even possible?

Best Answer

The documentation says:

This field can contain either a host name, an IP address range, or one of the special key words mentioned below.

An IP address range is specified using standard numeric notation for the range's starting address, then a slash (/) and a CIDR mask length.

Your addresses cannot be expressed with a CIDR mask (without also matching the other 125 addresses in the 0…127 range).