pg_ts_parser — PostgreSQL system catalog

The PostgreSQL pg_ts_parser system catalog: full column reference (names, types, descriptions), catalog relationships and version support.

Summary

The pg_ts_parser catalog contains entries defining text search parsers. A parser is responsible for splitting input text into lexemes and assigning a token type to each lexeme. Since a parser must be implemented by C-language-level functions, creation of new parsers is restricted to database superusers.

(Description quoted from the official PostgreSQL documentation.)

Columns

The pg_ts_parser system catalog exposes the following columns (names, types and descriptions are taken verbatim from the PostgreSQL documentation):

  • oid oid
    Row identifier
  • prsname name
    Text search parser name
  • prsnamespace oid references pg_namespace.oid
    The OID of the namespace that contains this parser
  • prsstart regproc references pg_proc.oid
    OID of the parser’s startup function
  • prstoken regproc references pg_proc.oid
    OID of the parser’s next-token function
  • prsend regproc references pg_proc.oid
    OID of the parser’s shutdown function
  • prsheadline regproc references pg_proc.oid
    OID of the parser’s headline function (zero if none)
  • prslextype regproc references pg_proc.oid
    OID of the parser’s lextype function

Related catalogs

This object references the following other system catalogs:

Version applicability

Present in PostgreSQL 17, 18, 19 (verified against each release’s documentation). This is a long-standing system object that also exists in earlier PostgreSQL releases.

Related & references

Reference: PostgreSQL documentation — pg_ts_parser.