RefLib

Reference library for AI

Back

postgresql_16:3.5.9.3 inet vs. cidr

PostgreSQL 16 > The SQL Language > Data Types > Network Address Types > inet vs. cidr

The essential difference between inet and cidr data types is that inet accepts values with nonzero bits to the right of the netmask, whereas cidr does not. For example, 192.168.0.1/24 is valid for inet but not for cidr.

Tip

If you do not like the output format for inet or cidr values, try the functions host, text, and abbrev.

Back