Skip to content

tag_parser

PostgreSQL Text Search parser extension for character separated lexemes

tag_parser · PostgreSQL Text Search parser extension for character separated lexemes

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
101799tag_parsertag_parser0.1.0FTSMITC

Usage

Sources:

tag_parser — A simple full text search parser for PostgreSQL, written in C. Is much simpler than the default tsearch parser, it will only split into lexeme’s at a comma boundary. This can easily be changed to any other character in the source code by changing the definition of BREAK_CHAR. Use it for the corresponding text-search, parsing, or linguistic workflow. Use the pinned upstream revision linked above as the API boundary and test it on the target PostgreSQL build.

Core Workflow

CREATE EXTENSION tag_parser;

Install the extension in the intended database, run the smallest upstream example above when available, and verify the installed version and returned values before integrating it into application SQL.

Important Objects

  • tagpsr_end(internal) is an extension function and returns void.
  • tagpsr_gettoken(internal, internal, internal) is an extension function and returns internal.
  • tagpsr_lextype(internal) is an extension function and returns internal.
  • tagpsr_start(internal, int4) is an extension function and returns internal.

Requirements and Caveats

  • The reviewed control file declares default version 0.1.0.
  • The control file marks the extension as relocatable.
  • Confirm privileges, supported PostgreSQL versions, upgrade behavior, and failure cases against the pinned source before production use.

Table reader