• Data Warehouse Service

dws
  1. Help Center
  2. Data Warehouse Service
  3. Developer Guide
  4. SQL Reference
  5. SQL Syntax
  6. CREATE EXTENSION

CREATE EXTENSION

Function

CREATE EXTENSION loads a new extension to the database.

Precautions

  • The syntax is only available in extended mode (when GUC parameter support_extended_features is on). Exercise caution when enabling the mode. It is used for tools like internal upgrade tools. Common users should not use the mode.
  • Create an extension and load it to the current database. The extension cannot be with the same name as those have been loaded.

Syntax

CREATE EXTENSION [ IF NOT EXISTS ] extension_name
    [ WITH ] [ SCHEMA schema_name ]
             [ VERSION version ]
             [ FROM old_version ];

Parameter Description

  • extension_name

    Specifies the extension name.

  • schema_name

    Specifies the name of the schema where the extension is installed.

  • version

    Specifies the version number of the extension.

  • old_version

    Specifies the original version number of the extension.