Hello,
I've read the description of pull request #27 but in my opinion it is hiding a major issue in how IPAddr treats interface addresses.
IPAddr does not have a distinction between IP addresses, Interface addresses (IP+length), Networks (Prefix+Length) and tries (with little success IMHO) to use a single class to represent everything.
PostgreSQL inet type's purpose is to contain addresses or interface addresses; 192.168.0.1/24 is a valid interface address.
When stored in an inet type, it gets automatically cast to an IPAddr which, however, clears the host part, corrupting the value.
Hello,
I've read the description of pull request #27 but in my opinion it is hiding a major issue in how IPAddr treats interface addresses.
IPAddr does not have a distinction between IP addresses, Interface addresses (IP+length), Networks (Prefix+Length) and tries (with little success IMHO) to use a single class to represent everything.
PostgreSQL inet type's purpose is to contain addresses or interface addresses; 192.168.0.1/24 is a valid interface address.
When stored in an inet type, it gets automatically cast to an IPAddr which, however, clears the host part, corrupting the value.