cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
30.01k stars 3.79k forks source link

sql: Support CIDR column type #18846

Open lgo opened 7 years ago

lgo commented 7 years ago

The CIDR column type for dealing with IP addresses in postgresql. It's closely related to the INET column type with some minor differences.

Many of the same functions for INET are supported by CIDR, either by casting it to an INET or from CIDR with a few differences, e.g.

See the postgres docs for features https://www.postgresql.org/docs/current/static/datatype-net-types.html https://www.postgresql.org/docs/current/static/functions-net.html

Jira issue: CRDB-5993

KempWatson commented 6 years ago

I notice INET type is in 2.0, but apparently not CIDR - will this be coming? Applications such as Netbox need both... To add to that, CRDB is targeted at distributed network-based applications - INET and CIDR datatypes are perfect for managing all kinds of things in this domain. ... not to mention that not having CIDR is an empty checkbox for any claimed Postgres compatibility. I would assume that Postgres added these datatypes because there was a need; if PG had the need, it can only be more of a need for the network-distributed CRDB.

KempWatson commented 1 year ago

Just a quick note here that although INET has been added, CIDR has not... so I think this issue should still be held open. 6 years so far... any idea when this might be implemented?