Today I learned that postgres offers a whole datatype for storing ipv4, ipv6 and mac addresses. Using this instead of plain text types can offer some advantages like error checking and ability to use specialized operators and functions.
- CIDR -> ipv4/6
- INET -> ipv4/6
- macaddr -> mac address
- macaddr8 -> mac address