This section contains information about configuring the database extensions that Database Service supports.
Install an extension
Extensions can only be installed on the primary DBCluster. Once installed, the extension is replicated to standby instances.
Most of the extensions can be installed directly by connecting to the database cluster and running the CREATE EXTENSION command.
However, there are a few extensions that require additional configuration, hence users must set database flag, "dbs.enable_<extension-name>": "on"
then connect to the database cluster and run the CREATE EXTENSION
command.
Only database users who are members of the cloudsqlsuperuser
or alloydbsuperuser
role can run the CREATE EXTENSION
command. By default, this includes the dbsadmin
user.
Drop an extension
In order to drop an extension, the database user attempting to do so must be the owner of the extension. This implies that only the database user who initially created the extension has the authority to drop it. No other database user possesses the ability to drop the extension, ensuring controlled management of extensions.
Supported database extensions
The following table lists all of the supported extensions.
Extension | Included with PostgreSQL | Included with AlloyDB Omni | Description |
---|---|---|---|
address_standardizer | Used to parse an address into constituent elements. Generally used to support geocoding address normalization step. | ||
address_standardizer_data_us | Address Standardizer US dataset example | ||
alloydb_ai_nl | Google Extension for AlloyDB AI & Natural Language | ||
amcheck | Provides functions for verifying the logical consistency of the structure of relations, enabling the pg_amcheck application to check for corruption. | ||
anon | Masks or replaces personally identifiable information (PII) or sensitive data from a PostgreSQL database. | ||
autonic | Provides functions for auto incrementing fields | ||
bloom | Provides a method to access indexes based on bloom filters. A bloom filter is a space-efficient data structure that you can use to test whether an element is a member of a set. | ||
btree_gin | Provides sample GIN operator classes that implement B-tree equivalent behavior. | ||
btree_gist | Provides GiST index operator classes that implement B-tree equivalent behavior. | ||
citext | Provides a case-insensitive character string type citext. | ||
cube | Implements a data type cube for representing multidimensional cubes. | ||
dblink | Provides functions to connect to PostgreSQL databases from within a database session | ||
dict_int | An add-on dictionary template for full-text search that controls the indexing of integers. | ||
dict_xsyn | Text search dictionary template for extended synonym processing | ||
earthdistance | Provides two approaches to calculating great circle distances on the surface of the Earth. | ||
fuzzystrmatch | Provides several functions to determine similarities and distance between strings. | ||
google_columnar_engine | Provides the columnar engine feature of AlloyDB, which handles HTAP (hybrid transactional analytical processing) and OLAP (online analytical processing) workloads very efficiently. | ||
google_db_advisor | Provides the index advisor feature of AlloyDB, which recommends indexes to speed up query processing. | ||
google_ml_integration | Provides functions you use to access Vertex AI endpoints to get predictions in SQL. | ||
postgresql-hll | Provides a HyperLogLog (hll) data structure that estimates the cardinality of a set. | ||
hstore | Implements the hstore data type for storing sets of key/value pairs within a single PostgreSQL value. | ||
hypopg | Provides support for hypothetical indexes. | ||
insert_username | Provides functions for storing the current user's name into a text field. You can use this function to track which user last modified a row in a database table. | ||
intagg | Provides an integer aggregator and an enumerator. | ||
intarray | Provides a set of functions and operators for manipulating null-free arrays of integers and performing indexed searches on them. | ||
ip4r | Provides data types for IPv4/v6 addresses, and address ranges, plus index support. | ||
isn | Provides data types for some international product numbering standards. | ||
lo | Support for managing Large Objects (also called LOs or BLOBs). | ||
ltree | Implements a data type ltree for representing labels of data stored in a hierarchical tree-like structure. | ||
moddatetime | Provides functions for storing the current time into a timestamp field. You can use this to track the last time that a row in a database table is modified. |
||
orafce | Provides functions and operators that emulate a subset of functions and packages from an Oracle database. Use these functions to port Oracle applications to PostgreSQL. | ||
pageinspect | Inspects the contents of database pages at a low level. | ||
pg_bigm | Enables full-text search, and allows a two-gram (bigram) index for faster full-text search. | ||
pg_buffercache | Provides a means for examining what's happening in the shared buffer cache in real time. | ||
pg_cron | Provides a cron-based job scheduler. This extension enables cron syntax to schedule PostgreSQL commands directly from the database. | ||
pg_freespacemap | Examines the free space map (FSM). | ||
pg_hint_plan | Lets you to improve PostgreSQL execution plans using hints, which are descriptions in SQL comments. | ||
pg_partman | Lets you to create and manage time-based and serial-based table partition sets. | ||
pg_prewarm | Provides a convenient way to load relation data into either the operating system buffer cache or the PostgreSQL buffer cache. | ||
pg_proctab | Lets you to use pg_top, and generate reports from the operating system process table. | ||
pg_repack | Lets you remove bloat from tables and indexes. Optionally, lets you perform an online CLUSTER (order tables by cluster index). | ||
pg_similarity | Provides support for similarity queries on PostgreSQL. | ||
pg_squeeze | Removes unused space from a table and optionally uses an index to sort records or rows (tuples) of the table. | ||
pg_stat_statements | Provides a means for tracking execution statistics of all SQL statements executed. | ||
pg_trgm | Provides functions and operators for determining the similarity of alphanumeric text based on trigram matching, as well as index operator classes that support fast searching for similar strings. | ||
pg_visibility | Provides a way to examine the visibility map (VM) and the page-level visibility information of a table. | ||
pg_wait_sampling | Collects sampling statistics of wait events, providing wait event data for processes on servers. | ||
pgaudit | Provides detailed session and object audit logging using the standard logging facility provided by PostgreSQL. | ||
pgcrypto | Provides cryptographic functions for PostgreSQL. | ||
pgfincore | A set of functions to manage pages in operating system disk cache memory from PostgreSQL. | ||
pglogical | Provides logical replication for PostgreSQL. | ||
pgrouting | Extends PostGIS, enabling geospatial processing through network routing and analysis. | ||
pgrowlocks | Provides row locking information for the specified table. | ||
pgstattuple | Provides various functions to obtain tuple-level statistics. | ||
pgtap | Provides a unit testing framework for PostgreSQL, written in PL/pgSQL and PL/SQL. | ||
pgtt | Adds support for global temporary tables to your databases. | ||
plpgsql | A loadable procedural language for creating functions, procedures and triggers. You also can use this language for direct execution of code in DO blocks. | ||
plproxy | Procedural language handler that allows remote procedure calls among PostgreSQL databases, with optional sharding. | ||
plv8 | Provides a procedural language for enabling JavaScript. | ||
postgis | PostGIS geometry and geography spatial types and functions | ||
postgres_ann | PostgreSQL ANN Search | ||
postgis_raster | PostGIS raster types and functions | ||
postgis_sfcgal | PostGIS SFCGAL functions | ||
postgis_tiger_geocoder | PostGIS tiger geocoder and reverse geocoder | ||
postgis_topology | PostGIS topology spatial types and functions | ||
postgres_fdw | Allows foreign data wrappers to be created within instances or across instances. | ||
prefix | Provides prefix-matching, plus index support. | ||
rdkit | Provides functions for comparing, manipulating, and identifying molecular structures. | ||
refint | Includes functions to check foreign key restraints, the referencing table, and the referenced table. | ||
sslinfo | Provides information about the SSL certificate that the current client provided when it connected to the instance. | ||
tablefunc | Includes various functions that return tables (multiple rows). | ||
tcn | Provides a trigger function that notifies listeners of changes to the content of database tables. | ||
temporal_tables | Provides support for temporal tables. A temporal table records the period of time when a row is valid from a database perspective. | ||
tsm_system_rows | Provides the table sampling method SYSTEM_ROWS , which can be used in the TABLESAMPLE clause of a SELECT command. |
||
tsm_system_time | Provides the table sampling method SYSTEM_TIME , which can be used in the TABLESAMPLE clause of a SELECT command. |
||
unaccent | A text search dictionary that removes accents (diacritic signs) from lexemes. | ||
uuid-ossp | Provides functions to generate universally unique identifiers (UUIDs) using one of several standard algorithms. | ||
pgvector | An open-source extension for storing and searching vector embeddings in PostgreSQL databases. |