↑↓ select↵ open⌫ change scopeOpen full search

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

Wiki / Functions

unnest

Expands a tsvector into a set of rows, one per lexeme.

English manual coverage begins with PostgreSQL 7.1. Source history and runtime observations have their own recorded version boundaries.

Reading PG 18·Select a recorded version

group
textsearch
group label
文本搜索函数和操作符
lang
en
layout
table-new
pages
functions-textsearch.html, functions-array.html, functions-range.html
prose only
false

Definition PG 18

Expands a tsvector into a set of rows, one per lexeme.

Signatures and overloads

unnest ( tsvector ) → setof record ( lexeme text, positions smallint[], weights text ) → setof record
Expands a tsvector into a set of rows, one per lexeme.
unnest ( anyarray ) → setof anyelement → setof anyelement
Expands an array into a set of rows. The array's elements are read out in storage order.
unnest ( anyarray, anyarray [, ... ] ) → setof anyelement, anyelement [, ... ] → setof anyelement, anyelement [, ... ]
Expands multiple arrays (possibly of different data types) into a set of rows. If the arrays are not all the same length then the shorter ones are padded with NULLs. This form is only allowed in a query's FROM clause; see Section 7.2.1.4.
unnest ( anymultirange ) → setof anyrange → setof anyrange
Expands a multirange into a set of ranges in ascending order.

Compare versions

Complete source facts

documentation revision

{"inputs":[{"file":"functions-array.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"69e6a499e7422b0c6c834a9e7e2afac2f72b6e0a253a5d2c721c1dd5008af656","version":"18.7"},{"file":"functions-range.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"adc48b5f4dd16fd7079e4b9821ef1877bf4bfa89274da44982672598fe53f9a5","version":"18.7"},{"file":"functions-textsearch.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"2383d74fd6eee4b71e1b97dec9754623081103120b67a9793f8deac5fff77727","version":"18.7"},{"file":"functions-array.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"339a4635cabc363866c291d440afcc4276c93f85d94bb3dc6ccdaa15101e91b6","version":"18.7"},{"file":"functions-range.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"0cf73372e4a803a8728ac799c436646b9273bfbf0bf645cee112401eaff4de59","version":"18.7"},{"file":"functions-textsearch.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"d8d1661c6d67bb109c5266be16236950471c11d91181aafa96e9055792c4fa78","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"}

Source references

Full definition and evidence JSON

Definition sources

center · PostgreSQL 18 · wiki-repair-20261023:0f7d903e1b545b77328a8bd0bcc9e68d8d4e230e100f00cd2ffdd0805799862f

Text language: en · wiki-repair-20261023:0f7d903e1b545b77328a8bd0bcc9e68d8d4e230e100f00cd2ffdd0805799862f