select open change scope Open full search

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

FUNCTIONS / TEXT SEARCH FUNCTIONS AND OPERATORS

array_to_tsvector

Read PG 18 manual ↗

Converts an array of text strings to a tsvector.

Signatures & examples

array_to_tsvector ( text[] ) → tsvector
Converts an array of text strings to a tsvector. The given strings are used as lexemes as-is, without further processing. Array elements must not be empty strings or NULL.
array_to_tsvector('{fat,cat,rat}'::text[]) → 'cat' 'fat' 'rat'
Version history 3
  1. PG 14 → 15changed
  2. PG 12 → 13changed
  3. PG 9.5 → 9.6added

Definition snapshot: 2026-09-14T13:14:25.684213+00:00@99e6866c · English manual source