Previous   Next 

Function parse

Converts text into a set of tokens.

parse([ parser OID | TEXT, ] txt TEXT) RETURNS SETOF TOKENOUT

  • If specified, 'parser' is an object id (oid) or a text name of a parser listed in table pg_ts_parser.
  • 'txt' is the text to convert into tokens.
SELECT * 
FROM parse( 'default','<p>PostgreSQL supports Multi-Version Concurrency Control.</p>' ); 

 tokid |     token
-------+---------------
    13 |
     1 | PostgreSQL
    12 |
     1 | supports
    12 |
    16 | Multi-Version
    11 | Multi
    12 | -
    11 | Version
    12 |
     1 | Concurrency
    12 |
     1 | Control
    12 | .
    13 |
(15 rows)