PostgreSQL Array Functions
This page lists array functions that help you to manipulate strings efficiently in PostgreSQL.
-
array_append
The PostgreSQLarray_append()
function appends the specified element to the end of the specified array and returns the modified array. -
array_cat
The PostgreSQLarray_cat()
function concatenates two specified arrays into one array and returns the result array. -
array_dims
The PostgreSQLarray_dims()
function returns a text representing the dimensions of the specified array. -
array_fill
The PostgreSQLarray_fill()
function returns an array filled with the specified elements. -
array_length
The PostgreSQLarray_length()
function returns the length of the specified array dimension. -
array_lower
The PostgreSQLarray_lower()
function returns the starting subscript of a specified array dimension. -
array_ndims
The PostgreSQLarray_ndims()
function returns the number of dimensions of the specified array. -
array_position
The PostgreSQLarray_position()
function finds the specified element in a specified array and returns the subscript of the the first occurrence. -
array_positions
The PostgreSQLarray_positions()
function finds the specified element in a specified array and returns subscripts of all occurrences as an array. -
array_prepend
The PostgreSQLarray_prepend()
function prepends the specified element to the start of the specified array and returns the modified array. -
array_remove
The PostgreSQLarray_remove()
function removes all specified elements from the specified array and returns the modified array. -
array_replace
The PostgreSQLarray_replace()
function replaces the specified element with a new element in the specified array and returns the modified array. -
array_to_string
The PostgreSQLarray_to_string()
function concatenates all elements in an array with a delimiter and returns the result. -
array_upper
The PostgreSQLarray_upper()
function returns the maximum subscript of the specified array dimension. -
cardinality
The PostgreSQLcardinality()
function returns the total number of all elements in an array. -
trim_array
The PostgreSQLtrim_array()
function removes the specified number of elements from the end of the specified array and returns the modified array. -
unnest
The PostgreSQLunnest()
function expands the specified array into a set of rows.