# PostgreSQL Data Types: Network Addresses

DevFeed: [PostgreSQL Data Types: Network Addresses](<https://devfeed.tech/articles/postgresql-data-types-network-addresses-34591.md>)

Original publisher: [Read original article](<https://tapoueh.org/blog/2018/04/postgresql-data-types-network-addresses/>)

Author: Dimitri Fontaine PostgreSQL Major Contributor; Author

Published: 2018-04-16T10:32:53Z

Content type: tutorial

Language: en

Sources: [Dimitri Fontaine](<https://devfeed.tech/sources/dimitri-fontaine.md>)

Topics: [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [Network](<https://devfeed.tech/topics/network.md>), [function](<https://devfeed.tech/topics/function.md>)

Tags: [functions](<https://devfeed.tech/tags/functions.md>), [indexing](<https://devfeed.tech/tags/indexing.md>), [ipv4](<https://devfeed.tech/tags/ipv4.md>), [ipv6](<https://devfeed.tech/tags/ipv6.md>), [logs](<https://devfeed.tech/tags/logs.md>), [network](<https://devfeed.tech/tags/network.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>)

## AI overview

This tutorial explains PostgreSQL network address types, including cidr, inet, and macaddr. It demonstrates loading Apache log data and using set_masklen() to analyze addresses under arbitrary CIDR network masks.

## Source excerpt

Continuing our series of PostgreSQL Data Types today we're going to introduce network address types. PostgreSQL includes support for both cidr, inet, and macaddr data types. Again, those types are bundled with indexing support and advanced functions and operator support.