↑↓ 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

plainto_tsquery

Read the PG 18 manual

Converts text to a tsquery, normalizing words according to the specified or default configuration.

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

Signatures & examples

plainto_tsquery ( [ config regconfig, ] query text ) → tsquery
Converts text to a tsquery, normalizing words according to the specified or default configuration. Any punctuation in the string is ignored (it does not determine query operators). The resulting query matches documents containing all non-stopwords in the text.
plainto_tsquery('english', 'The Fat Rats') → 'fat' & 'rat'
Version history 2
  1. 12 → 13 changed
  2. 8.2 → 8.3 added

Definition snapshot: b7bd9cda · English manual source