Contents
Array
A variable-length, multi-dimensional list of a data type
An array
is a variable-length list of a particular data type consisting of one or more dimensions.
Support for arrays
has always been present in PostgreSQL, though the implementation and availability of related functions has been improved substantially over time.
Change history
Work-in-progress
- PostgreSQL 14
trim_array()
function added (commit 0a687c8f)
- PostgreSQL 9.6
- one or both boundaries in an array slice specifier can be omitted (commit 6efbded6)
array_to_tsvector()
function added (commit 6943a946)tsvector_to_array()
function added (commit 6943a946)
- PostgreSQL 9.5
array_position()
function added (initial commit 13dbc7a8)array_positions()
function added (initial commit 13dbc7a8)
- PostgreSQL 9.4
- PostgreSQL 9.3
array_remove()
function added (commit 84a42560)array_replace()
function added (commit 84a42560)
- PostgreSQL 9.2
array_to_json()
function added (commit 39909d1d)
- PostgreSQL 8.4
array_agg()
function added (commit 3379fae6)array_fill()
function added (commit 2c773296)array_length()
function added (commit f98f6ee0)array_ndims()
function added (commit 254aecb7)cardinality()
function added (commit f98f6ee0)generate_subscripts()
function added (commit 1fcb977a)unnest()
function added (commit c889ebce)
- PostgreSQL 8.2
- support for
NULL
elements added (initial commit cecb6075) array_nulls
backwards compatibility parameter added (commit cecb6075)
- support for
- PostgreSQL 7.4
ARRAY[]
constructor added (commit 730840c9)array_append()
function added (commit 730840c9)array_cat()
function added (commit 730840c9)array_lower()
function added (commit fef731d1)array_prepend()
function added (commit 730840c9array_to_string()
function added (commit b3c0551e)array_upper()
function added (commit fef731d1)string_to_array()
function added (commit b3c0551e)
References
- PostgreSQL documentation: Arrays
- PostgreSQL documentation: Array Functions and Operators
- PostgreSQL documentation: Array Constructors