All Products
Search
Document Center

Hologres:Extensions

Last Updated:Dec 02, 2024

Hologres allows you to install extensions to implement additional features. This topic describes the extensions that are supported by Hologres and how to install, view, and uninstall extensions.

Limits

  • You can install extensions in only one schema of each database. For example, if you have installed extensions in the default schema of a database, you cannot install extensions in other schemas of the database.

  • If you install an extension in the pg_catalog system schema, the feature provided by the extension can be used in all schemas of the database by default. If you do not specify a schema when you install an extension, the extension is installed in the public schema by default.

  • You can install or uninstall an extension only as a superuser.

  • You can install only built-in extensions. Custom extensions and external extensions cannot be installed.

Extensions

Extension

Feature

References

Description

spm or slpm

Enables function calls of the simple permission model (SPM).

Use the SPM and Use the SLPM

None.

hive_compatible

Uses the get_json_object() function.

JSON functions

None.

hologres_fdw

Queries data across databases in Hologres.

Query data across databases (beta)

Only exclusive instances support this extension. Shared Cluster instances do not support this extension.

dlf_fdw

Uses Data Lake Formation (DLF) to read OSS data.

Use DLF to read data from and write data to OSS

None.

proxima

Uses Proxima to perform vector processing.

Vector processing based on Proxima

Only exclusive instances support this extension. Shared Cluster instances do not support this extension.

flow_analysis

Uses intended user identification functions and funnel analysis functions.

Funnel analysis functions and Intended user identification functions

None.

roaringbitmap

Uses roaring bitmap functions.

Roaring bitmap functions

Only exclusive instances support this extension. Shared Cluster instances do not support this extension.

hg_binlog

Consumes Hologres binary log data.

Use JDBC to consume Hologres binary logs

Only exclusive instances support this extension. Shared Cluster instances do not support this extension.

postgis

Uses spatial functions.

PostGIS for geographic information analysis

Only exclusive instances support this extension. Shared Cluster instances do not support this extension.

clickhouse

Migrates data from ClickHouse to Hologres.

Migrate data from ClickHouse to Hologres

Only exclusive instances support this extension. Shared Cluster instances do not support this extension.

Install an extension

  • Syntax

    To install an extension, execute the following SQL statement:

    -- You must install an extension as a superuser.
    CREATE extension IF NOT EXISTS <extension_name> SCHEMA <schema_name>;

    Parameter

    Description

    extension_name

    The extension that you want to install. For more information about the extensions that are supported by Hologres, see the "Extensions" section.

    schema_name

    The schema in which you want to install the extension. If you do not specify a schema, the extension is installed in the public schema by default. We recommend that you specify the pg_catalog schema. This way, the extension takes effect on all schemas in the database.

  • Examples

    Install the postgis extension in the pg_catalog schema.

    CREATE extension if not exists postgis schema pg_catalog;

View the installed extensions in the current database

To view the extensions that are installed in the current database, execute the following SQL statement:

SELECT
    e.extname AS "Name",
    e.extversion AS "Version",
    n.nspname AS "Schema",
    c.description AS "Description"
FROM
    pg_catalog.pg_extension e
    LEFT JOIN pg_catalog.pg_namespace n ON n.oid = e.extnamespace
    LEFT JOIN pg_catalog.pg_description c ON c.objoid = e.oid
        AND c.classoid = 'pg_catalog.pg_extension'::pg_catalog.regclass
    ORDER BY        1;

Uninstall an extension

To uninstall an extension, execute the following SQL statement:

-- You must uninstall an extension as a superuser.
DROP extension <extension_name>;

Parameter

Description

extension_name

The extension that you want to uninstall. For more information about the extensions that are supported by Hologres, see the "Extensions" section.