INET Functions & Operators

These apply to MonetDB SQL type: inet (IPv4 Network Address).

An IPv4 Network Address string has a specific syntax, see also IPv4 address.

<is less thaninet '' < inet ''true
<=is less than or equalinet '' <= inet ''true
=equalsinet '' = inet ''true
>is greater thaninet '' > inet ''true
>=is greater than or equalinet '' >= inet ''true
<>is not equalinet '' <> inet ''true
<<is contained byinet '' << inet '192.168.1/24'true
<<=is contained by or equalsinet '192.168.1/24' <<= inet '192.168.1/24'true
>>containsinet '192.168.1/24' >> inet ''true
>>=contains or equalsinet '192.168.1/24' >>= inet '192.168.1/24'true

Inet functions

Note: You must include the sys. prefix for all these inet functions (see examples) in order to work properly from other schemas than sys.

FunctionReturn typeDescriptionExampleResult
sys.abbrev(inet)clobabbreviated display format as textsys.abbrev(inet '')10.1/16
sys.broadcast(inet)inetbroadcast address for networksys.broadcast(inet '') IP address as '')
sys.hostmask(inet)inetconstruct host mask for networksys.hostmask(inet '')
sys.left_shift(inet, inet)booleanis contained bysys.left_shift(inet '192.168.1/24', inet '')true
sys.left_shift_assign(inet, inet)booleanis contained by or equalssys.left_shift_assign(inet '192.168.1/24', inet '192.168.1/24')true
sys.masklen(inet)intextract netmask lengthsys.masklen(inet '')24
sys.netmask(inet)inetconstruct netmask for networksys.netmask(inet '') network part of '')
sys.right_shift(inet, inet)booleancontainssys.right_shift(inet '192.168.1/24', inet '')true
sys.right_shift_assign(inet, inet)booleancontains or equalssys.right_shift_assign(inet '192.168.1/24', inet '192.168.1/24')true
sys.setmasklen(inet, int)inetset netmask length for inet valuesys.setmasklen(inet '', 16)
sys.text(inet)clobextract IP address and netmask length as textsys.text(inet '')