Eri*_*ang 8 postgresql ip-address inet
我想检查一系列范围内是否存在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'但是我不确定如何在范围列表中使用它而不必构造<<链的<<的.
Clo*_*eto 13
select inet '192.168.1.5' << any (array['192.168.1/24', '10/8']::inet[]);
?column?
----------
t
Run Code Online (Sandbox Code Playgroud)
http://www.postgresql.org/docs/current/static/functions-comparisons.html#AEN18486
| 归档时间: |
|
| 查看次数: |
4622 次 |
| 最近记录: |