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-7. PostgresIP V4 Operators

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