Extension
    • PDF

    Extension

    • PDF

    Article Summary

    Available in VPC

    You can manage the extensions of the created PostgreSQL. When you change an extension, it may be applied to the whole service or selected database, depending on the type of extension. For some extensions, DB server restarts automatically when you change them.

    Install extensions

    The following describes how to install an extension.

    1. From NAVER Cloud Platform console, Click the Services > Database > Cloud DB for PostgreSQL menus in that order.
    2. Click DB server.
    3. Click the PostgreSQL server you want to manage, and click the [Manage DB] button.
    4. Click the [View DB server details] button.
    5. When the View DB service details page appears, select the Manage extensions tab menu.
      clouddbforpostgresql-extension-1-1
    6. Select the extension to install from the Extension Name dropdown list.
    7. Select the database to install from the Database Name dropdown list.
    • In case of selecting an extension that is applied to all database, such as 'passwordcheck', the Database Name dropdown list will be disabled.
    • cdb_admin schema is created to the installed database separately, and the selected extension is installed.
    1. Click the [Install] button.
      • DB server restart pop-up window will appear if the DB server needs to be restarted.
        clouddbforpostgresql-extension-1-2
      • Install extensions pop-up window will appear if the DB server does not need to be restarted.
        clouddbforpostgresql-extension-1-3
    2. Check the information on the pop-up window, and click the [Install] button.

    Set extensions

    How to change extension settings is the same as how to change the existing DB config settings. For more details, refer to the Manage DB config.

    Caution

    If the set config values are not appropriate, the extension may not operate properly. Make sure to fully understand the action of the config variable before setting the extension.

    Delete extensions

    The following describes how to delete an extension.

    1. From NAVER Cloud Platform console, Click the Services > Database > Cloud DB for PostgreSQL menus in that order.

    2. Click DB server.

    3. Click the PostgreSQL server you want to manage, and click the [Manage DB] button.

    4. Click the [View DB server details] button.

    5. When the View DB service details page appears, select the Manage extensions tab menu.

    6. Click the [Delete] button on the right of the extension to delete on the extension management page.

      • Delete extensions pop-up window will appear if the DB server does not need to be restarted.
        clouddbforpostgresql-extension-1-4
      • Delete extensions and DB server restart pop-up windows will appear if the DB server needs to be restarted.
        clouddbforpostgresql-extension-1-5
    7. Read the information on the pop-up window, check the 'Checked' box, and click the [Delete] button.

    Use extensions

    The following describes how to use an extension.

    Use extensions: extensions installed through the console

    • You can install the extensions that require superuser permission only through the console.
    • Such extensions provide "cdb_admin", a separate schema, and are installed under the applicable schema.
    • After installation, add "cdb_admin" schema to the search_path at the session level or use it in the cdb_admin.{extension_object} format explicitly.

    The following are examples of using search_path.

    show search_path;
    set search_path = "$user", public, cdb_admin;
    create table cdb_test (val vector(3));
    select userid from pg_stat_statements limit 1;
    

    The following are examples of using them explicitly.

    create table cdb_test (val cdb_admin.vector(3));
    select userid from cdb_admin.pg_stat_statements limit 1;
    

    List of supported extensions

    The following is the list of extensions supported in the Cloud DB for PostgreSQL service of NAVER Cloud Platform.

    The following are the extensions that can be installed from NAVER Cloud Platform console.

    Extension nameDescriptionNeed to restartInstallation rangeOfficial website
    pgvectorProvides types and calculation for the vectorODatabasehttps://github.com/pgvector/pgvector
    pg_stat_statementsProvides statistics on the performed SQL statementsXDatabasehttps://www.postgresql.org/docs/en/current/pgstatstatements.html
    passwordcheckWhen performing create role or alter role, checks user's password and returns an error if it is vulnerableOAll serviceshttps://www.postgresql.org/docs/en/current/passwordcheck.html
    Note

    Extensions displayed as 'Need to restart' automatically restart when they are installed for the first time or deleted for the last time at the service level.

    The following are the extensions that users can install manually. As the extensions that users can install manually do not require superuser permission, users can create extensions.

    • btree_gin
    • btree_gist
    • citext
    • cube
    • dict_int
    • fuzzystrmatch
    • hstore
    • intarray
    • isn
    • lo
    • ltree
    • pg_trgm
    • pgcrypto
    • seg
    • tablefunc
    • tcn
    • tsm_system_rows
    • tsm_system_time
    • unaccent
    • uuid-ossp

    The following describes how to create an extension manually.

    psql -h {ip} -p {port} -d {db name} -U {user name}
    create extension "uuid-ossp" with {schema name};
    

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.