tsvector_to_array()

A function converting a tsvector to lexemes

tsvector_to_array() is a system function for converting a tsvector to an array of lexemes.

tsvector_to_array() was added in PostgreSQL 9.6.

Usage

tsvector_to_array ( tsvector ) → text[]

Change history

Examples

Basic usage example for tsvector_to_array():

postgres=# SELECT tsvector_to_array(to_tsvector('foo a bar is bar bar is foo boo'));
 tsvector_to_array 
-------------------
 {bar,boo,foo}
(1 row)

Categories

Arrays, Full Text Search

See also

array_to_tsvector()