- Print
- PDF
Extension
- Print
- PDF
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.
- From NAVER Cloud Platform console, Click the Services > Database > Cloud DB for PostgreSQL menus in that order.
- Click DB server.
- Click the PostgreSQL server you want to manage, and click the [Manage DB] button.
- Click the [View DB server details] button.
- When the View DB service details page appears, select the Manage extensions tab menu.
- Select the extension to install from the Extension Name dropdown list.
- 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.
- Click the [Install] button.
- DB server restart pop-up window will appear if the DB server needs to be restarted.
- Install extensions pop-up window will appear if the DB server does not need to be restarted.
- DB server restart pop-up window will appear if the DB server needs to be restarted.
- 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.
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.
From NAVER Cloud Platform console, Click the Services > Database > Cloud DB for PostgreSQL menus in that order.
Click DB server.
Click the PostgreSQL server you want to manage, and click the [Manage DB] button.
Click the [View DB server details] button.
When the View DB service details page appears, select the Manage extensions tab menu.
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.
- Delete extensions and DB server restart pop-up windows will appear if the DB server needs to be restarted.
- Delete extensions pop-up window will appear if the DB server does not need to be restarted.
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 name | Description | Need to restart | Installation range | Official website |
---|---|---|---|---|
pgvector | Provides types and calculation for the vector | O | Database | https://github.com/pgvector/pgvector |
pg_stat_statements | Provides statistics on the performed SQL statements | X | Database | https://www.postgresql.org/docs/en/current/pgstatstatements.html |
passwordcheck | When performing create role or alter role, checks user's password and returns an error if it is vulnerable | O | All services | https://www.postgresql.org/docs/en/current/passwordcheck.html |
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};