AnalyticDB for PostgreSQL is an online, distributed cloud data warehousing service that consists of multiple compute nodes and provides massively parallel processing (MPP) data warehousing services. It is developed by Alibaba Cloud based on Greenplum Database with enhanced, in-depth extensions.

Supported extensions

AnalyticDB for PostgreSQL supports the following extensions:

  • PostGIS: processes geographic data. For more information, see Use PostGIS.

  • MADlib: provides a machine learning function library.

  • fuzzystrmatch: implements the fuzzy match of strings.

  • orafunc: compatible with some Oracle functions,seeUse orafunc

    .
    Note AnalyticDB for PostgreSQL V4.3 supports this extension, while AnalyticDB for PostgreSQL V6.0 does not.
  • orafce: compatible with some Oracle functions,seeUse orafce.
    Note AnalyticDB for PostgreSQL V4.3 supports this extension, while AnalyticDB for PostgreSQL V6.0 does not.
  • oss_ext: reads data from OSS.

  • HyperLogLog: collects statistics. For more information, see Use HyperLogLog.

  • PL/Java: compiles user-defined functions (UDFs) in PL/Java. For more information, see Using the PL /Java UDF.

  • pgcrypto: provides cryptography functions that use encryption algorithms to ensure data security. Algorithms include MD5 message-digest (MD5), Secure Hash Algorithm 1 (SHA-1), SHA-224, SHA-256, SHA-384, SHA-512, Blowfish, Advanced Encryption Standard 128 (AES-128), AES-256, Raw Encryption, Pretty Good Privacy (PGP) symmetric keys, and PGP public keys. For more information, see pgcrypto.

  • IntArray: provides integer array-related functions, operators, and indexes.

  • RoaringBitmap: uses the RoaringBitmap efficient compression algorithm for bitmap operations.

  • postgres_fdw: enables data access across databases.
    Note AnalyticDB for PostgreSQL V6.0 supports this extension, while AnalyticDB for PostgreSQL V4.3 does not.
  • tablefunc: includes various functions that return tables.
    Note AnalyticDB for PostgreSQL V6.0 supports this extension, while AnalyticDB for PostgreSQL V4.3 does not.

Create an extension

Execute the following statements:

CREATE EXTENSION <extension name>;
CREATE SCHEMA <schema name>;
CREATE EXTENSION IF NOT EXISTS <extension name> WITH SCHEMA <schema name>;
Notice Before you create an MADlib extension, you must create a plpythonu extension.
CREATE EXTENSION plpythonu;
CREATE EXTENSION madlib;

Delete an extension

Execute the following statements:

Notice If an object depends on an extension, you must add the CASCADE keyword to delete the object.
DROP EXTENSION <extension name>;
DROP EXTENSION IF EXISTS <extension name> CASCADE;