I l @ ve RuBoard |
The network operators that are built into PostgreSQL are useful for making comparisons between IP addresses. These operators function on INET and CIDR data types equally. Listing
Notes/ExamplesUse the following to find all the IP addresses less than the one specified: SELECT * FROM computers WHERE ipaddr<'192.168.0.100' Similarly, use the following to find all the IP addresses on the given subnet: SELECT * FROM computers WHERE ipaddr<<'192.168.0.1/24' |
I l @ ve RuBoard |