小编Eri*_*ang的帖子

Postgres检查IP(inet)是否在IP范围列表中

我想检查一系列范围内是否存在IP,例如: SELECT * FROM ip_address WHERE ip IN (<list of ip ranges>)

Postgresql文档声明使用<<运算符来检查IP是否包含在单个IP范围内,例如:inet '192.168.1.5' << inet '192.168.1/24'但是我不确定如何在范围列表中使用它而不必构造<<链的<<的.

postgresql ip-address inet

8
推荐指数
1
解决办法
4622
查看次数

标签 统计

inet ×1

ip-address ×1

postgresql ×1