30th September 2021: PostgreSQL 14 Released!
Unsupported versions: 6.4
This documentation is for an unsupported version of PostgreSQL.
You may want to view the same page for the current version, or one of the other supported versions listed above instead.

IP V4 Operators

Table 9-6. PostgresIP V4 Operators

Operator Description Usage
< Less than ''::cidr < ''::cidr
<= Less than or equal ''::cidr <= ''::cidr
= Equals ''::cidr = ''::cidr
%gt;= Greater or equal ''::cidr >= ''::cidr
%gt; Greater ''::cidr %gt; ''::cidr
<> Not equal ''::cidr <> ''::cidr
<< is contained within ''::cidr << '192.168.1/24'::cidr
<<= is contained within or equals '192.168.1/24'::cidr <<= '192.168.1/24'::cidr
>> contains '192.168.1/24'::cidr >> ''::cidr
>>= contains or equals '192.168.1/24'::cidr >>= '192.168.1/24'::cidr