Difference between revisions of "CREATE EXTENSION"
Jump to navigation
Jump to search
Line 6: | Line 6: | ||
[ CASCADE ] | [ 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. | + | * <code>CASCADE</code> 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 == | == Examples == |
Revision as of 15:01, 6 February 2023
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 IF NOT EXISTS pg_stat_statements WITH SCHEMA public;
CREATE EXTENSION uuid-ossp;
- TimescaleDB installation:
CREATE EXTENSION IF NOT EXISTS timescaledb;
Related
See also
Advertising: