Difference between revisions of "CREATE EXTENSION"
Jump to navigation
Jump to search
Line 13: | Line 13: | ||
* <code>create extension [[btree_gist]];</code> | * <code>create extension [[btree_gist]];</code> | ||
* <code>create extension [[postgres_fdw]];</code> | * <code>create extension [[postgres_fdw]];</code> | ||
+ | * <code>[[CREATE EXTENSION uuid-ossp]];</code> | ||
* <code>CREATE EXTENSION [[IF NOT EXISTS]] [[pg_stat_statements]] WITH [[SCHEMA]] public;</code> | * <code>CREATE EXTENSION [[IF NOT EXISTS]] [[pg_stat_statements]] WITH [[SCHEMA]] public;</code> | ||
− | |||
* <code>[[CREATE EXTENSION IF NOT EXISTS timescaledb]];</code> ([[TimescaleDB installation]]) | * <code>[[CREATE EXTENSION IF NOT EXISTS timescaledb]];</code> ([[TimescaleDB installation]]) | ||
Revision as of 14:56, 19 December 2024
CREATE EXTENSION [ IF NOT EXISTS ] extension_name [ WITH ] [ SCHEMA schema_name ] [ VERSION version ] [ CASCADE ]
CASCADE
Automatically install any extensions that this extension depends on that are not already installed. Their dependencies are likewise automatically installed, recursively. The SCHEMA clause, if given, applies to all extensions that get installed this way. Other options of the statement are not applied to automatically-installed extensions; in particular, their default versions are always selected.
Examples
CREATE EXTENSION pg_stat_statements;
create extension pg_trgm;
create extension btree_gist;
create extension postgres_fdw;
CREATE EXTENSION uuid-ossp;
CREATE EXTENSION IF NOT EXISTS pg_stat_statements WITH SCHEMA public;
CREATE EXTENSION IF NOT EXISTS timescaledb;
(TimescaleDB installation)
Related
See also
Advertising: