Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inet type is converted to IPAddr which clears the host part #353

Open
vihai opened this issue Aug 29, 2020 · 0 comments
Open

inet type is converted to IPAddr which clears the host part #353

vihai opened this issue Aug 29, 2020 · 0 comments

Comments

@vihai
Copy link

vihai commented Aug 29, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant