Skip to main content

PostgreSQL extensions

Last update:

You can add extensions to databases PostgreSQL. Extensions allow you to add functionality to a database without changing the source code of the DBMS itself.

For a list of extensions available in Managed Databases, see the Extension Description table.

Some extensions depend on others; dependent extensions will not work without the primary extension. You can see a list of dependent and primary extensions in the Dependent Extensions table.

You can add an extension in the dashboard, through the Managed Databases API and through Terraform.

Add extension

Extensions are connected separately to each database. If you connect a dependent extension and the primary extension is not yet connected, the primary extension will be connected automatically first, followed by the dependent one.

  1. In the dashboard, on the top menu, click Products and select Managed Databases.
  2. Open the Active tab.
  3. Open the cluster page → Databases tab → database card.
  4. In the Extensions block, click Add extension.
  5. Select an extension. For a list of available extensions and their descriptions, see the Extension Description table.
  6. Click Add.

Delete extension

A dependent extension can be removed separately. To remove a primary extension, remove the dependent one first. You can see a list of dependent and primary extensions in the Dependent Extensions table.

  1. In the dashboard, on the top menu, click Products and select Managed Databases.
  2. Open the Active tab.
  3. Open the cluster page → Databases tab → database card.
  4. In the Extensions block, in the extension row, click .

Extension description

address_standardizerUsed to structure postal addresses provided as a string
address_standardizer_data_usUsed to structure US and Canadian postal addresses for the address_standardizer extension
autoinc

Contains the autoinc() function. This function returns the next value for a sequence stored in an integer field. Unlike built-in types that manage sequences, autoinc():

  • blocks attempts to insert a value from a query into the field;
  • allows the value in the field to be changed when updating a record
bloomAdds access to database indexes based on Bloom filters, which require significantly less memory than hash tables but allow for false positives
btree_ginContains examples of GIN (Generalized Inverted Index) operator classes, which are used for reverse searches
btree_gistContains GiST (Generalized Search Tree) operator classes. Unlike B-tree indexes, GiST supports <> (not equal) and < - > (distance) operators, although it does not guarantee the uniqueness of returned values
citextContains the citext data type, which is used for case-insensitive string operations
clickhouse_fdw

Allows you to connect directly from a PostgreSQL cluster to ClickHouse databases using a Foreign Data Wrapper.

Using this extension requires the dbaas_admin role. This role is automatically granted to the database owner; it cannot be assigned to other users.

Extension is only available for versions PostgreSQL 15, 16, and 17

cubeContains the cube data type, which is used to represent multidimensional cubes
dblinkSupports connecting to other PostgreSQL databases from the current session
dict_intContains an example of an additional dictionary template for full-text search, which can be used to prevent unique word lists from growing and increase search speed
dict_xsynContains an example of an additional synonym dictionary template (Extended Synonym Dictionary) for full-text search: when searching for a word, all its synonyms will be found
fuzzystrmatchContains functions used to determine the similarity and difference between strings
h3-pg

Provides an API to H3, an open system for indexing geographic objects in a grid of hexagonal zones (tiles). It allows you to divide territory into identical tiles for geospatial data analysis, such as building heatmaps and traffic or mobility analysis. Can be used together with PostGIS for advanced geospatial data analysis.

Extension is only available for versions PostgreSQL 15, 16, and 17

hstoreContains the hstore type, which allows you to store key/value pairs in a single table field and work with them efficiently
intarrayContains functions and operators for working with integer arrays that do not contain empty (NULL) values
ip4rSupports IPv4 and IPv6 address indexing to improve query performance
isnContains data types for international product numbering standards EAN13, UPC, ISBN, ISMN, and ISSN. Number validation and generation are performed according to a specified list of prefixes
jsonb_plperl

Adds support for json and jsonb data types in the PL/Perl procedural language. Allows you to use JSON data directly when writing Perl functions and triggers

jsqueryAllows you to use the JsQuery language to work with jsonb type data. JsQuery allows you to organize efficient searches in nested objects and contains additional comparison operators with index support.
loContains the lo data type and the lo_manage() function, which are used to manage Binary Large Objects (BLOB) in accordance with JDBC and ODBC driver specification requirements (standard PostgreSQL behavior does not correspond to them)
ltreeContains the ltree data type for representing data labels stored in a tree-like hierarchical structure
moddatetimeContains the moddatetime() function, which allows you to track the last modification time of a table row
mysql_fdw

Allows you to connect directly from a PostgreSQL cluster to MySQL databases using a Foreign Data Wrapper.

Using this extension requires the dbaas_admin role. This role is automatically granted to the database owner; it cannot be assigned to other users.

Extension is only available for versions PostgreSQL 15, 16, and 17

oracle_fdw

Allows you to connect directly from a PostgreSQL cluster to Oracle databases using a Foreign Data Wrapper.

Using this extension requires the dbaas_admin role. This role is automatically granted to the database owner; it cannot be assigned to other users.

Extension is only available for versions PostgreSQL 15, 16, and 17

pg_buffercache

Allows you to track the state of the shared buffer cache in real time.

Using this extension requires the dbaas_admin role. This role is automatically granted to the database owner; it cannot be assigned to other users.

Extension is only available for versions PostgreSQL 15, 16, and 17

pg_repack

Allows you to rebuild tables and indexes without locking to reduce their size and fragmentation.

Using this extension requires the dbaas_admin role. This role is automatically granted to the database owner; it cannot be assigned to other users

pg_stat_statements

Adds the ability to track planning and collect execution statistics for all SQL queries running in the cluster.

Using this extension requires the dbaas_admin role. This role is automatically granted to the database owner; it cannot be assigned to other users

pg_trgm

Contains tools for quickly searching for similar strings based on trigram matching.

Extension is only available for versions PostgreSQL 15, 16, and 17

pgcryptoProvides a set of cryptographic functions for data protection. For more information about data encryption using the pgcrypto extension and usage examples, see the Data Encryption guide
pgrowlocksContains the pgrowlocks() function, which returns information about row-level locks in a specified table
pgstattuple

Provides detailed statistics on disk space usage and allows you to analyze index fragmentation, the number of dead tuples, and free space. This extension is useful for performance diagnostics, index optimization, planning VACUUM operations, and using the pg_repack extension

pgTAPProvides a set of tools for testing database schemas and SQL functions
plpgsql

Allows you to use the PL/pgSQL procedural language to create functions, procedures, and triggers. This extension is enabled by default and is automatically available in all databases created in the cluster. You do not need to connect it separately via the Control Panel

plv8Allows you to use JavaScript to write stored procedures and triggers
postgis

Allows you to store and process geographic information system (GIS) objects in PostgreSQL databases.

Using this extension requires the dbaas_admin role. This role is automatically granted to the database owner; it cannot be assigned to other users

postgis_rasterAllows you to work with raster images and perform analysis of geographic information system (GIS) objects in databases
postgres_fdw

Allows you to connect directly from a PostgreSQL cluster to data stored on external servers (other PostgreSQL clusters) using a Foreign Data Wrapper.

Using this extension requires the dbaas_admin role. This role is automatically granted to the database owner; it cannot be assigned to other users

prefixAllows you to use prefixes and masks to optimize queries
rumAdds an access method for working with RUM indexes
segContains the seg data type for representing line segments or floating-point intervals
tablefuncContains a set of functions that return tables (sets of rows)
tcn

Provides a trigger function to create notifications about changes in tables to which the trigger is attached.

Extension is only available for versions PostgreSQL 15, 16, and 17

tsm_system_rows

Provides a row-count sampling method (SYSTEM_ROWS), which can be used in the TABLESAMPLE clause of a SELECT command.

Extension is only available for versions PostgreSQL 15, 16, and 17

tsm_system_time

Provides a time-based sampling method (SYSTEM_TIME), which can be used in the TABLESAMPLE clause of a SELECT command.

Extension is only available for versions PostgreSQL 15, 16, and 17

unaccentContains a dictionary for searching text without regard to diacritical marks
uuid-osspContains functions for generating UUIDs according to standard algorithms
vectorAllows you to work with vector data — store, index, and query
xml2Allows you to use XPath queries and XSLT

Dependent extensions

earthdistanceContains a module for calculating distances between points on the Earth's surface. Works only with the cube primary extension
pg_stat_kcache

Adds the ability to collect statistics on read and write operations performed at the file system level. Works only with the pg_stat_statements primary extension.

Using this extension requires the dbaas_admin role. This role is automatically granted to the database owner; it cannot be assigned to other users

pgroutingContains functions for geospatial routing in PostGIS databases. Works only with the postgis primary extension
postgis_tiger_geocoderContains functions for geocoding based on TIGER data format. Works only with the postgis primary extension
postgis_topology

Contains data types and functions of the postgis extension for managing topological objects. Works only with the postgis primary extension.

Using this extension requires the dbaas_admin role. This role is automatically granted to the database owner; it cannot be assigned to other users