Perform CIDR queries
See original GitHub issueI am trying to move my database over to Hasura but its not clear how can I store and use native Postgres functionality of querying and storing CIDR values. For example:
Create table to store INET/CIDR:
CREATE TABLE test_cidr ( id SERIAL PRIMARY KEY, ip CIDR UNIQUE, region VARCHAR(1000), service VARCHAR(1000));
Table contents
test_cidr
ip
64.6.64.0/24
Select query on Table
SELECT * FROM test_cidr WHERE ip >> '152.53.xxx.xx';
This returns a list of CIDR which includes this IP. This works on native Postgres. I am wondering how can I achieve this using implicit datatype?
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
cidr Search Operator - Sumo Logic Docs
CIDR operators can be used to compare the network segment of two IPv4 addresses, or just identify the network segment involved in particular...
Read more >Understanding IP Addresses, Subnets, and CIDR Notation for ...
IP addresses, networks, submasks, and CIDR notation can be difficult concepts to understand. In this guide, we will cover some of the ideas ......
Read more >What is CIDR (Classless Inter-Domain Routing or supernetting)?
CIDR (Classless Inter-Domain Routing or supernetting) is a method of assigning IP addresses that improves the efficiency of address distribution and ...
Read more >How can I do a CIDR query on SQL Server Binary Column Type
I'm intending to use binary(16), with IPv4 encoded as IPv4-mapped-IPv6 so there is one single consistent representation of any one IP address. I ......
Read more >Classless Inter Domain Routing (CIDR) - GeeksforGeeks
Classless Inter Domain Routing (CIDR) · All IP addresses must be contiguous. · Block size must be the power of 2 (2 n...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@marionschleifer do you think there is any chance this will be implemented in the near future? Our project is really depending on it, so we would need an indication if hasura might be suitable or not. many TIA.
@coco98 I am wondering if there is a chance this issue might be prioritized?