diff options
Diffstat (limited to 'doc/src/sgml/ref/alter_extension.sgml')
-rw-r--r-- | doc/src/sgml/ref/alter_extension.sgml | 37 |
1 files changed, 34 insertions, 3 deletions
diff --git a/doc/src/sgml/ref/alter_extension.sgml b/doc/src/sgml/ref/alter_extension.sgml index e9eb1aafbb6..a6c0062fe24 100644 --- a/doc/src/sgml/ref/alter_extension.sgml +++ b/doc/src/sgml/ref/alter_extension.sgml @@ -23,6 +23,7 @@ PostgreSQL documentation <refsynopsisdiv> <synopsis> +ALTER EXTENSION <replaceable class="PARAMETER">extension_name</replaceable> UPDATE [ TO <replaceable class="PARAMETER">new_version</replaceable> ] ALTER EXTENSION <replaceable class="PARAMETER">extension_name</replaceable> SET SCHEMA <replaceable class="PARAMETER">new_schema</replaceable> ALTER EXTENSION <replaceable class="PARAMETER">extension_name</replaceable> ADD <replaceable class="PARAMETER">member_object</replaceable> ALTER EXTENSION <replaceable class="PARAMETER">extension_name</replaceable> DROP <replaceable class="PARAMETER">member_object</replaceable> @@ -62,6 +63,17 @@ ALTER EXTENSION <replaceable class="PARAMETER">extension_name</replaceable> DROP <variablelist> <varlistentry> + <term><literal>UPDATE</literal></term> + <listitem> + <para> + This form updates the extension to a newer version. The extension + must supply a suitable update script (or series of scripts) that can + modify the currently-installed version into the requested version. + </para> + </listitem> + </varlistentry> + + <varlistentry> <term><literal>SET SCHEMA</literal></term> <listitem> <para> @@ -77,7 +89,7 @@ ALTER EXTENSION <replaceable class="PARAMETER">extension_name</replaceable> DROP <listitem> <para> This form adds an existing object to the extension. This is mainly - useful in extension upgrade scripts. The object will subsequently + useful in extension update scripts. The object will subsequently be treated as a member of the extension; notably, it can only be dropped by dropping the extension. </para> @@ -89,7 +101,7 @@ ALTER EXTENSION <replaceable class="PARAMETER">extension_name</replaceable> DROP <listitem> <para> This form removes a member object from the extension. This is mainly - useful in extension upgrade scripts. The object is not dropped, only + useful in extension update scripts. The object is not dropped, only disassociated from the extension. </para> </listitem> @@ -120,6 +132,18 @@ ALTER EXTENSION <replaceable class="PARAMETER">extension_name</replaceable> DROP </varlistentry> <varlistentry> + <term><replaceable class="PARAMETER">new_version</replaceable></term> + <listitem> + <para> + The desired new version of the extension. This can be written as + either an identifier or a string literal. If not specified, + <command>ALTER EXTENSION UPDATE</> attempts to update to whatever is + shown as the default version in the extension's control file. + </para> + </listitem> + </varlistentry> + + <varlistentry> <term><replaceable class="PARAMETER">new_schema</replaceable></term> <listitem> <para> @@ -231,7 +255,14 @@ ALTER EXTENSION <replaceable class="PARAMETER">extension_name</replaceable> DROP <title>Examples</title> <para> - To change the schema of the extension <literal>hstore</literal> + To update the <literal>hstore</literal> extension to version 2.0: +<programlisting> +ALTER EXTENSION hstore UPDATE TO '2.0'; +</programlisting> + </para> + + <para> + To change the schema of the <literal>hstore</literal> extension to <literal>utils</literal>: <programlisting> ALTER EXTENSION hstore SET SCHEMA utils; |