↑↓ select ↵ open ⌫ change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Functions / Array Functions And Operators

array_to_string

Read the PG 18 manual

Converts each array element to its text representation, and concatenates those separated by the delimiter string.

Reading PG 18current·documented in 24 of 27 versions, 7.4 to 20

Signatures & examples

array_to_string ( array anyarray, delimiter text [, null_string text ] ) → text
Converts each array element to its text representation, and concatenates those separated by the delimiter string. If null_string is given and is not NULL, then NULL array entries are represented by that string; otherwise, they are omitted. See also string_to_array.
array_to_string(ARRAY[1, 2, 3, NULL, 5], ',', '*') → 1,2,3,*,5
Version history 6
  1. 14 → 15 changed
  2. 12 → 13 changed
  3. 9.0 → 9.1 changed
  4. 8.3 → 8.4 changed
  5. 7.4 → 8.0 changed
  6. 7.3 → 7.4 added

Definition snapshot: b7bd9cda · English manual source