inetrange
inetrange · Range type for PostgreSQL inet values with range operators and GiST indexing support.
Overview
Usage
Sources:
- Upstream README at the reviewed commit
- Extension control file
- Version 1.0.2 SQL objects
- Current PGXN distribution
inetrange adds a PostgreSQL range type whose subtype is inet. It supports ordinary range containment and overlap operators, GiST indexing, and exclusion constraints for non-overlapping IP address intervals.
Bounds follow PostgreSQL range rules, while the subtype follows inet ordering across IPv4 and IPv6 values. Choose inclusive and exclusive endpoints deliberately and test canonical application representations before using equality as a business key.
Version 1.0.2 has current source and PGXN distribution but no explicit modern PostgreSQL compatibility matrix. Test GiST index builds, exclusion constraints, mixed address families, dump/restore, and upgrades on the target major before storing long-lived values.