I want to check if an IP address exists in a range of ranges, for example: SELECT * FROM ip_address WHERE ip IN (<list of ip ranges>)
The Postgresql documentation states the use of the <operator to check if the IP is contained within the same IP range, for example: inet '192.168.1.5' << inet '192.168.1/24'but I'm not sure how to use it in the list of ranges without creating an OR chain from <<.
source
share