4 ALTER EXTENSION — change the definition of an extension
8 ALTER EXTENSION name UPDATE [ TO new_version ]
9 ALTER EXTENSION name SET SCHEMA new_schema
10 ALTER EXTENSION name ADD member_object
11 ALTER EXTENSION name DROP member_object
13 where member_object is:
15 ACCESS METHOD object_name |
16 AGGREGATE aggregate_name ( aggregate_signature ) |
17 CAST (source_type AS target_type) |
18 COLLATION object_name |
19 CONVERSION object_name |
21 EVENT TRIGGER object_name |
22 FOREIGN DATA WRAPPER object_name |
23 FOREIGN TABLE object_name |
24 FUNCTION function_name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ] |
25 MATERIALIZED VIEW object_name |
26 OPERATOR operator_name (left_type, right_type) |
27 OPERATOR CLASS object_name USING index_method |
28 OPERATOR FAMILY object_name USING index_method |
29 [ PROCEDURAL ] LANGUAGE object_name |
30 PROCEDURE procedure_name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ] |
31 ROUTINE routine_name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ] |
33 SEQUENCE object_name |
36 TEXT SEARCH CONFIGURATION object_name |
37 TEXT SEARCH DICTIONARY object_name |
38 TEXT SEARCH PARSER object_name |
39 TEXT SEARCH TEMPLATE object_name |
40 TRANSFORM FOR type_name LANGUAGE lang_name |
44 and aggregate_signature is:
47 [ argmode ] [ argname ] argtype [ , ... ] |
48 [ [ argmode ] [ argname ] argtype [ , ... ] ] ORDER BY [ argmode ] [ argname ] a
53 ALTER EXTENSION changes the definition of an installed extension. There
57 This form updates the extension to a newer version. The
58 extension must supply a suitable update script (or series of
59 scripts) that can modify the currently-installed version into
60 the requested version.
63 This form moves the extension's objects into another schema. The
64 extension has to be relocatable for this command to succeed.
67 This form adds an existing object to the extension. This is
68 mainly useful in extension update scripts. The object will
69 subsequently be treated as a member of the extension; notably,
70 it can only be dropped by dropping the extension.
73 This form removes a member object from the extension. This is
74 mainly useful in extension update scripts. The object is not
75 dropped, only disassociated from the extension.
77 See Section 36.17 for more information about these operations.
79 You must own the extension to use ALTER EXTENSION. The ADD/DROP forms
80 require ownership of the added/dropped object as well.
85 The name of an installed extension.
88 The desired new version of the extension. This can be written as
89 either an identifier or a string literal. If not specified,
90 ALTER EXTENSION UPDATE attempts to update to whatever is shown
91 as the default version in the extension's control file.
94 The new schema for the extension.
102 The name of an object to be added to or removed from the
103 extension. Names of tables, aggregates, domains, foreign tables,
104 functions, operators, operator classes, operator families,
105 procedures, routines, sequences, text search objects, types, and
106 views can be schema-qualified.
109 The name of the source data type of the cast.
112 The name of the target data type of the cast.
115 The mode of a function, procedure, or aggregate argument: IN,
116 OUT, INOUT, or VARIADIC. If omitted, the default is IN. Note
117 that ALTER EXTENSION does not actually pay any attention to OUT
118 arguments, since only the input arguments are needed to
119 determine the function's identity. So it is sufficient to list
120 the IN, INOUT, and VARIADIC arguments.
123 The name of a function, procedure, or aggregate argument. Note
124 that ALTER EXTENSION does not actually pay any attention to
125 argument names, since only the argument data types are needed to
126 determine the function's identity.
129 The data type of a function, procedure, or aggregate argument.
133 The data type(s) of the operator's arguments (optionally
134 schema-qualified). Write NONE for the missing argument of a
138 This is a noise word.
141 The name of the data type of the transform.
144 The name of the language of the transform.
148 To update the hstore extension to version 2.0:
149 ALTER EXTENSION hstore UPDATE TO '2.0';
151 To change the schema of the hstore extension to utils:
152 ALTER EXTENSION hstore SET SCHEMA utils;
154 To add an existing function to the hstore extension:
155 ALTER EXTENSION hstore ADD FUNCTION populate_record(anyelement, hstore);
159 ALTER EXTENSION is a PostgreSQL extension.
163 CREATE EXTENSION, DROP EXTENSION