# PostgreSQL Data Types: Arrays

DevFeed: [PostgreSQL Data Types: Arrays](<https://devfeed.tech/articles/postgresql-data-types-arrays-34588.md>)

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

Author: Dimitri Fontaine PostgreSQL Major Contributor; Author

Published: 2018-04-20T12:47:25Z

Content type: tutorial

Language: en

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

Topics: [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [Databases](<https://devfeed.tech/topics/databases.md>)

Tags: [array-agg](<https://devfeed.tech/tags/array-agg.md>), [arrays](<https://devfeed.tech/tags/arrays.md>), [data-type](<https://devfeed.tech/tags/data-type.md>), [dataset](<https://devfeed.tech/tags/dataset.md>), [indexing](<https://devfeed.tech/tags/indexing.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [query](<https://devfeed.tech/tags/query.md>), [sql](<https://devfeed.tech/tags/sql.md>)

## AI overview

This tutorial introduces PostgreSQL array data types, explaining when arrays can replace lookup tables and how to work with array elements in SQL. It demonstrates importing geolocated tweets, extracting hashtag arrays, aggregating matches, and using GIN indexing to query array contents.

## Source excerpt

Continuing our series of PostgreSQL Data Types today we're going to introduce the PostgreSQL array data types. Arrays can be used to denormalize data and avoid lookup tables. A good rule of thumb for using them that way is that you mostly use the array as a whole, even if you might at times search for elements in the array. Heavier processing is going to be more complex than a lookup table.