Skip to main content
Version: 2.x

pg_trgm

The pg_trgm module provides functions and operators for determining the similarity of alphanumeric text based on trigram matching. The module also provides GiST and GIN index operator classes that support fast searching for similar strings.

The Apache Cloudberry pg_trgm module is equivalent to the PostgreSQL pg_trgm module. There are no MPP-specific considerations for the module.

Install and register the module​

pg_trgm is built and installed by a default Apache Cloudberry build. Register the extension in each database in which you want to use it:

CREATE EXTENSION pg_trgm;

Module documentation​

See pg_trgm in the PostgreSQL documentation for details about the functions, operators, and index operator classes in this module.