Skip to main content
PostgreSQL extensions
Last update:

PostgreSQL extensions

Extensions can be attached to PostgreSQL databases. Extensions allow adding functionality to the database without changing the source code of the DBMS itself.

For a list of extensions available in cloud databases, see the Extension Description table.

Some extensions depend on other extensions — dependent extensions will not work without the main extension. You can see the list of dependent and main extensions in the Dependent Ext ensions table.

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

Add extension

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

  1. In the Control panel, on the top menu, click Products and select Cloud 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. The list of available extensions and their descriptions can be found in the Extension Description table.
  6. Click Add.

Delete extension

A dependent extension can be removed separately. To remove the main extension, first remove the dependent extension. You can see the list of dependent and main extensions in the Dependent Ext ensions table.

  1. In the Control panel, on the top menu, click Products and select Cloud Databases.
  2. Open the Active tab.
  3. Open the cluster page → Databases tab → Database card.
  4. In the Extensions block, in the extension bar, click .

Extension Description

address_standardizerUsed to structure postal addresses passed 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 the sequence, which is stored in an integer type field. Unlike built-in types that control sequences, autoinc():

  • blocks attempts to insert a value from the query into the field;
  • allows you to change the value in the field when updating the record
bloomAdds access to database indexes based on Bloom filters, which require much less memory than hash tables but allow false positives
btree_ginContains sample classes of the GIN (Generalized Inverted Index) operator, which is used for reverse lookups
btree_gistContains classes of the GiST (Generalized Search Tree) operator. Unlike B-tree indexes, GiST supports the operators <> (not equal) and < — > (distance), although it does not provide uniqueness of returned values
citextContains the citext data type, which is used for case-insensitive string manipulation
cubeContains the cube data type, which is used to represent multidimensional cubes
dblinkSupports connection 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 avoid the list of unique words from growing and increase the search speed
dict_xsynContains an example of an Extended Synonym Dictionary template for full-text search: when you search for a word, all its synonyms will be found
fuzzystrmatchContains functions that are used to determine the similarities and differences between strings
hstoreContains the hstore type, which allows key/value pairs to be stored in a single table field and handled efficiently
intarrayContains functions and operators for working with arrays of integers that do not contain empty (NULL) values
ip4rSupports IPv4 and IPv6 address indexing to improve query performance
isn'tContains data types for international product numbering standards EAN13, UPC, ISBN, ISMN and ISSN. Numbers are checked and generated by the specified list of prefixes
jsqueryAdds support for the JsQuery language, which is used to work with data of type jsonb. JsQuery allows to organize efficient search 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 Object (BLOB) according to the requirements of JDBC and ODBC driver specifications (the standard PostgreSQL behavior does not comply with them)
ltreeContains the ltree data type to represent data labels stored in a tree-like hierarchical structure
moddatetimeContains the moddatetime() function, which allows you to track the time of the last modification of a table row
pg_partmanAdds advanced table partitioning capabilities, including time-based or sequence-based table partitioning
pg_repackAllows to rebuild tables and indexes without locking to reduce their size and fragmentation. The dbaas_admin role is required to use the extension — this role is automatically assigned to the database owner, it cannot be assigned to other users
pg_stat_statementsAdds the ability to track scheduling and collect execution statistics of all SQL queries running in the cluster. To use the extension, the dbaas_admin role is required — this role is automatically assigned to the database owner, it cannot be assigned to other users
pgtrgmContains tools to quickly find similar strings based on trigram matching
pgcryptoProvides a set of cryptographic functions to protect data. Learn more about data encryption with the pgcrypto extension and examples of use in the Data Encryption tutorial.
pgrowlocksContains the pgrowlocks() function, which returns information about row locks in the specified table
pgstattupleProvides detailed statistics on disk space usage and allows you to analyze index fragmentation, the number of "dead" tuples and free space. The extension is useful for performance diagnostics, index optimization and scheduling VACUUM and AUTOVACUUM operations
pgTAPProvides a set of tools for testing database schema and SQL functions
plv8Allows you to use JavaScript to write stored procedures and triggers
postgisAllows storing and processing geographic information system (GIS) objects in PostgreSQL databases. To use the extension, the dbaas_admin role is required — this role is automatically assigned to the database owner, it cannot be assigned to other users
postgis_rasterAllows you to work with raster images and analyze geographic information system (GIS) objects in databases
postgis_fdwAdds support for Foreign Data Wrapper to access external PostgreSQL servers. The dbaas_admin role is required to use the extension — this role is automatically given to the database owner, it cannot be assigned to other users
prefixAdds support for 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)
unaccentContains a dictionary for searching text without diacritical marks
uuid-osspContains functions for generating UUIDs using standard algorithms
vectorAllows you to work with vector data — store, index and execute queries
xml2Adds support for XPath queries and XSLT language

Dependent extensions

earthdistanceContains a module for calculating distances between points on the Earth's surface. Works only together with the main cube extension
pg_stat_kcacheAdds the ability to collect statistics on read and write operations performed at the file system level. Works only together with the main extension pg_stat_statements. The dbaas_admin role is required to use this extension  — this role is automatically assigned to the database owner, it cannot be assigned to other users
pgroutingContains functions for geospatial routing of the PostGIS database. Works only in conjunction with the main postgis extension
postgis_tiger_geocoderContains functions for geocoding based on data in TIGER format. Works only in conjunction with the main postgis extension
postgis_topologyContains postgis extension data types and functions for managing topological objects. Works only together with the main postgis extension . To use the extension, the dbaas_admin role is required  — this role is automatically assigned to the database owner, it cannot be assigned to other users