Array comparisons compare the array contents
element-by-element, using the default B-tree comparison function
for the element data type. In multidimensional arrays the
elements are visited in row-major order (last subscript varies
most rapidly). If the contents of two arrays are equal but the
dimensionality is different, the first difference in the
dimensionality information determines the sort order. (This is a
change from versions of PostgreSQL prior to 8.2: older versions
would claim that two arrays with the same contents were equal,
even if the number of dimensions or subscript ranges were
different.)

In string_to_array, if the
delimiter parameter is NULL, each character in the input string
will become a separate element in the resulting array. If the
delimiter is an empty string, then the entire input string is
returned as a one-element array. Otherwise the input string is
split at each occurrence of the delimiter string.

In string_to_array, if the
null-string parameter is omitted or NULL, none of the substrings
of the input will be replaced by NULL. In array_to_string, if the null-string parameter
is omitted or NULL, any null elements in the array are simply
skipped and not represented in the output string.

Note: There are two differences in the behavior of
string_to_array from pre-9.1
versions of PostgreSQL.
First, it will return an empty (zero-element) array rather
than NULL when the input string is of zero length. Second, if
the delimiter string is NULL, the function splits the input
into individual characters, rather than returning NULL as
before.

See also Section 9.18
about the aggregate function array_agg for use with arrays.

Submit correction

If you see anything in the documentation that is not correct, does not match
your experience with the particular feature or requires further clarification,
please use
this form
to report a documentation issue.