Supported extensions
Extensions are modules that add functions, operators, data types, and other objects to a database. Each extension bundles related SQL objects into a single package.
To see which extensions are available in your cluster, as well as their default and installed versions, query the pg_available_extensions view:
SELECT name, default_version, installed_version
FROM pg_available_extensions
ORDER BY name;
To see all available versions of each extension, query the pg_available_extension_versions view.
To install an available extension, run the following command in the target database:
CREATE EXTENSION <extension_name>;
Built-in extensions
Below is a full list of extensions that ship with Greengage DB. Exceptions, such as extensions that are installed by default or require preloading, are noted in their descriptions. The availability of some extensions depends on the build options.
- amcheck
-
Provides functions for verifying the logical consistency of B-tree indexes on the master and segments.
- btree_gin
-
Provides support for indexing common data types using GIN indexes.
- citext
-
Implements a case-insensitive, multibyte-aware text data type.
- credcheck
-
Checks role names and passwords against configurable policies when a role is created or renamed or its password is changed. It also supports a password reuse policy and banning roles after repeated authentication failures. See the
credcheckREADME for details. Requires preloading as described in Install extensions that require preloading. - dblink
-
Supports connections to other PostgreSQL databases from within a database session.
- fuzzystrmatch
-
Provides functions that measure string similarity and calculate distances between strings using various algorithms, such as the Levenshtein distance.
- gp_array_agg
-
Provides the
gp_array_agg()aggregate function, an alternative to the built-inarray_agg()function that supports parallel aggregation. - gp_check_functions
-
Provides views and functions for detecting and moving orphaned data files, as well as for detecting missing data files, for example, the
gp_check_orphaned_filesandgp_check_missing_filesviews. - gp_distribution_policy
-
Provides functions that check whether table rows are stored on the segments defined by the table’s distribution policy.
- gp_internal_tools
-
Provides the
session_state.session_level_memory_consumptionview, which shows memory consumption of sessions on the master and segments. - gp_legacy_string_agg
-
Implements the legacy, single-argument
string_agg()aggregate function that was available in Greenplum Database 5. - gp_parallel_retrieve_cursor
-
Provides functions and views, such as the gp_endpoints view, for working with parallel retrieve cursors, which return query results directly from segments in parallel.
- gp_percentile_agg
-
Provides the
gp_percentile_cont()andgp_percentile_disc()aggregate functions, an alternative to the built-inpercentile_cont()andpercentile_disc()ordered-set aggregate functions. - gp_pitr
-
Provides functions and views for distributed point-in-time recovery. The
gp_create_restore_point()function creates a named restore point on the master and all segments, thegp_switch_wal()function switches WAL files on the master and all segments, and thegp_stat_archiverview shows WAL archiver statistics across the cluster. - gp_sparse_vector
-
Adds the
svecdata type for sparse vectors of floating-point numbers. Runs of repeated values, such as zeros, are stored in a compressed form, which saves space and speeds up vector operations. The extension objects are created in thesparse_vectorschema. See thegp_sparse_vectorREADME for details. - gp_subtransaction_overflow
-
Provides the gp_suboverflowed_backend view and the
gp_get_suboverflowed_backends()function, which identify backends with subtransaction overflows. - hstore
-
Implements a data type for storing sets of key/value pairs within a single data field.
- isn
-
Provides support for international product numbering standards (EAN13, UPC, ISBN, ISMN, and ISSN).
- ltree
-
Implements a data type for hierarchical tree-like structures.
- orafce
-
Implements SQL functions and operators that emulate a subset of functions and packages from the Oracle database. See the
orafceREADME for details. - pageinspect
-
Provides functions for inspecting the contents of database pages at a low level. Available to superusers only.
- pg_buffercache
-
Provides views that show shared buffer cache metrics across the cluster.
- pg_cron
-
Implements a cron-based job scheduler that runs SQL commands on a schedule. The extension can be created only in the database specified by the
cron.database_nameconfiguration parameter (postgresby default). To run jobs in other databases, use thecron.schedule_in_database()function. See thepg_cronREADME for details. Requires preloading as described in Install extensions that require preloading. - pg_stat_statements
-
Tracks execution statistics of all SQL statements executed by a server. Requires preloading as described in Install extensions that require preloading.
- pg_trgm
-
Provides text similarity measurement and index searching based on trigram matching.
- pgcrypto
-
Provides cryptographic functions, including data encryption and decryption. See Data encryption for details.
- plperl
-
Provides support for the PL/Perl procedural language.
- plperlu
-
Provides support for the untrusted PL/PerlU procedural language.
- plpgsql
-
Provides support for the PL/pgSQL procedural language. Installed by default in all databases.
- plpythonu, plpython2u
-
Provide support for the untrusted PL/PythonU procedural language based on Python 2.7.
plpythonuandplpython2uare two names for the same language. Theplpython3uextension based on Python 3 is available only if Greengage DB is built from source with Python 3 support. See PL/Python for details. - postgres_fdw
-
Implements a foreign data wrapper for accessing tables in a remote PostgreSQL or Greengage DB database. See Foreign tables for details.
- sslinfo
-
Provides information about the SSL certificate that the current client presented when connecting to Greengage DB.
- tablefunc
-
Provides functions that return tables (for example,
crosstab). - temp_tables_stat
-
Tracks data files of temporary tables on segments. Provides the
tts_get_seg_files()function, which shows the size of these files, as well as the user and session that created them. See thetemp_tables_statREADME for details. Requires preloading as described in Install extensions that require preloading. - uuid-ossp
-
Provides functions to generate universally unique identifiers (UUIDs). The extension name must be enclosed in double quotes:
CREATE EXTENSION "uuid-ossp";
Install extensions that require preloading
The libraries of the credcheck, pg_cron, pg_stat_statements, and temp_tables_stat extensions must be loaded at server start by using the shared_preload_libraries configuration parameter.
The library name matches the extension name.
To install such an extension:
-
Check the current value of
shared_preload_libraries:$ gpconfig -s shared_preload_libraries -
Append the library name to the current value:
$ gpconfig -c shared_preload_libraries -v '<current_value>,<extension_name>'where
<current_value>is the value from the previous step and<extension_name>is the extension name, for example,pg_stat_statements. If the current value is empty, specify the extension name only. -
$ gpstop -r -
Create the extension in the target database:
CREATE EXTENSION <extension_name>;
Extensions from other repositories
Some Greengage-related extensions are developed and maintained in separate repositories.
Their source code is not part of the main greengage repository.
Install such an extension as described in its documentation.
- diskquota
-
Enforces disk usage limits per schema, role, or tablespace in Greengage DB. See Use diskquota for details.
Source: diskquota
- madlib
-
Greengage DB MADlib (fork of Apache MADlib) — a scalable in-database machine learning and analytics library.
Source: madlib
- plcontainer
-
Runs Python and R user-defined functions (UDFs) in isolated Docker containers. See PL/Container for details.
Source: plcontainer
- pxf
-
Provides the
pxfprotocol for external tables that access external data sources through PXF. See PXF documentation for details.Source: pxf
- pxf_fdw
-
Provides foreign data wrappers for PXF connectors, such as
jdbc_pxf_fdw,s3_pxf_fdw, andhdfs_pxf_fdw. See PXF documentation for details.Source: pxf