-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
sql: support inet data types #6981
Comments
This is required by a popular app that runs on Postgres - Mastodon. |
adding @nstewart to the chain |
This is absolutely required for any modern day application. It being open for more than a year with barely any updates is worrisome. |
This is on our radar and is scheduled to be part of the 1.2 release (mid-2018). We expect it to be in an alpha version of CockroachDB much earlier than that. |
Adds further support for cockroachdb#6981. This adds several built-in functions for the INET column. See https://www.postgresql.org/docs/9.6/static/functions-net.html for reference. The added built-ins are: - abbrev(inet) text - broadcast(inet) text - family(inet) int (this is "ip_family" due to a YACC grammar conflict) - host(inet) text - hostmask(inet) inet - masklen(inet) int - netmask(inet) inet - set_masklen(inet, int) inet - text(inet) text - inet_same_family(inet, inet) boolean This does not include the built-ins - network(inet) cidr - inet_merge(inet, inet) cidr
We are not adding CIDR support now until we find a need for it. Thanks! |
What defines a need? |
Adds further support for cockroachdb#6981. This adds several built-in functions for the INET column. See https://www.postgresql.org/docs/9.6/static/functions-net.html for reference. The added built-ins are: - abbrev(inet) text - broadcast(inet) text - family(inet) int (this is "ip_family" due to a YACC grammar conflict) - host(inet) text - hostmask(inet) inet - masklen(inet) int - netmask(inet) inet - set_masklen(inet, int) inet - text(inet) text - inet_same_family(inet, inet) boolean This does not include the built-ins - network(inet) cidr - inet_merge(inet, inet) cidr
Adds further support for cockroachdb#6981. This adds several built-in functions for the INET column. See https://www.postgresql.org/docs/9.6/static/functions-net.html for reference. The added built-ins are: - abbrev(inet) text - broadcast(inet) text - family(inet) int - host(inet) text - hostmask(inet) inet - masklen(inet) int - netmask(inet) inet - set_masklen(inet, int) inet - text(inet) text - inet_same_family(inet, inet) boolean This does not include the built-ins - network(inet) cidr - inet_merge(inet, inet) cidr This also moves 'FAMILY' in the SQL grammar from reserved_keyword to type_func_name_keyword.
Adds further support for cockroachdb#6981. This adds several built-in functions for the INET column. See https://www.postgresql.org/docs/9.6/static/functions-net.html for reference. The added built-ins are: - abbrev(inet) text - broadcast(inet) text - family(inet) int - host(inet) text - hostmask(inet) inet - masklen(inet) int - netmask(inet) inet - set_masklen(inet, int) inet - text(inet) text - inet_same_family(inet, inet) boolean This does not include the built-ins - network(inet) cidr - inet_merge(inet, inet) cidr This also moves 'FAMILY' in the SQL grammar from reserved_keyword to type_func_name_keyword.
Adds further support for cockroachdb#6981. This adds several built-in functions for the INET column. See https://www.postgresql.org/docs/9.6/static/functions-net.html for reference. The added built-ins are: - abbrev(inet) text - broadcast(inet) text - family(inet) int - host(inet) text - hostmask(inet) inet - masklen(inet) int - netmask(inet) inet - set_masklen(inet, int) inet - text(inet) text - inet_same_family(inet, inet) boolean This does not include the built-ins - network(inet) cidr - inet_merge(inet, inet) cidr This also moves 'FAMILY' in the SQL grammar from reserved_keyword to type_func_name_keyword.
In the case of CIDR, if people bring up major projects that make use of that column specifically then I'd be more than happy to spend some time adding it. To my knowledge, CIDR is strictly less useful than INET as it seems to be a subset of INET. I'll be closing this as I've added the INET type and it's built-ins, but I created an issue to track the CIDR type, #18846. I also didn't add many of the operators postgres supports for INET yet so there's another issue to track that, #18847. I didn't find the operators were in common use so I just didn't get around to it yet. |
NetBox? Any modern cloud app (like, the apps that would want CRDB), would have good use for all three network datatypes. |
@KempWatson you're lucky I was running a random script on the github database to notice your comment. We don't see comments on closed issues otherwise. Please file a new issue if you find this important. |
The inet and cidr data types in postgresql are very powerful for applications that deal with IP addresses; in particular IPv6 ones.
https://www.postgresql.org/docs/current/static/datatype-net-types.html
https://www.postgresql.org/docs/current/static/functions-net.html
The text was updated successfully, but these errors were encountered: