table of contents
ALTER EXTENSION(7) | PostgreSQL 17.2 Documentation | ALTER EXTENSION(7) |
NAME¶
ALTER_EXTENSION - change the definition of an extension
SYNOPSIS¶
ALTER EXTENSION name UPDATE [ TO new_version ] ALTER EXTENSION name SET SCHEMA new_schema ALTER EXTENSION name ADD member_object ALTER EXTENSION name DROP member_object where member_object is:
ACCESS METHOD object_name |
AGGREGATE aggregate_name ( aggregate_signature ) |
CAST (source_type AS target_type) |
COLLATION object_name |
CONVERSION object_name |
DOMAIN object_name |
EVENT TRIGGER object_name |
FOREIGN DATA WRAPPER object_name |
FOREIGN TABLE object_name |
FUNCTION function_name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ] |
MATERIALIZED VIEW object_name |
OPERATOR operator_name (left_type, right_type) |
OPERATOR CLASS object_name USING index_method |
OPERATOR FAMILY object_name USING index_method |
[ PROCEDURAL ] LANGUAGE object_name |
PROCEDURE procedure_name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ] |
ROUTINE routine_name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ] |
SCHEMA object_name |
SEQUENCE object_name |
SERVER object_name |
TABLE object_name |
TEXT SEARCH CONFIGURATION object_name |
TEXT SEARCH DICTIONARY object_name |
TEXT SEARCH PARSER object_name |
TEXT SEARCH TEMPLATE object_name |
TRANSFORM FOR type_name LANGUAGE lang_name |
TYPE object_name |
VIEW object_name and aggregate_signature is: * | [ argmode ] [ argname ] argtype [ , ... ] | [ [ argmode ] [ argname ] argtype [ , ... ] ] ORDER BY [ argmode ] [ argname ] argtype [ , ... ]
DESCRIPTION¶
ALTER EXTENSION changes the definition of an installed extension. There are several subforms:
UPDATE
SET SCHEMA
ADD member_object
DROP member_object
You must own the extension to use ALTER EXTENSION. The ADD/DROP forms require ownership of the added/dropped object as well.
PARAMETERS¶
name
new_version
new_schema
object_name
aggregate_name
function_name
operator_name
procedure_name
routine_name
source_type
target_type
argmode
argname
argtype
left_type
right_type
PROCEDURAL
type_name
lang_name
EXAMPLES¶
To update the hstore extension to version 2.0:
ALTER EXTENSION hstore UPDATE TO '2.0';
To change the schema of the hstore extension to utils:
ALTER EXTENSION hstore SET SCHEMA utils;
To add an existing function to the hstore extension:
ALTER EXTENSION hstore ADD FUNCTION populate_record(anyelement, hstore);
COMPATIBILITY¶
ALTER EXTENSION is a PostgreSQL extension.
SEE ALSO¶
CREATE EXTENSION (CREATE_EXTENSION(7)), DROP EXTENSION (DROP_EXTENSION(7))
2024 | PostgreSQL 17.2 |