Updated on 2025-05-29 GMT+08:00

DROP EXTENSION

The extended function is for internal use only. You are advised not to use it. Currently, DROP EXTENSION can be performed only on postgis, postgis_sfcgal, postgis_raster, postgis_topology, yukon_geomodel, yukon_geogridcoder, pkg_bpchar_opc, and tablefunc.

Description

Deletes an extension.

Precautions

  • The DROP EXTENSION command drops an extension from the database. When you drop an extension, the components that make up the extension are also deleted.
  • The DROP EXTENSION command can be used only by the owner of the extension or the initial user.

Syntax

DROP EXTENSION [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ];

Parameters

  • IF EXISTS

    If the IF EXISTS parameter is used and the extension does not exist, no error is reported. Instead, a notice is generated.

  • name

    Specifies the name of an installed extension.

  • CASCADE

    Automatically deletes objects that depend on the extension.

  • RESTRICT

    If any object depends on an extension, the extension cannot be deleted (unless all its member objects and other extension objects are deleted at a time using the DROP command). This is a default processing.

Helpful Links

CREATE EXTENSION