バージョンごとのドキュメント一覧

DROP EXTENSION

DROP EXTENSION <refpurpose>remove an extension</refpurpose> — 拡張を削除する

概要

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

説明

<title>Description</title>

<command>DROP EXTENSION</command> removes extensions from the database. Dropping an extension causes its member objects, and other explicitly dependent routines (see <xref linkend="sql-alterroutine"/>, the <literal>DEPENDS ON EXTENSION <replaceable>extension_name</replaceable> </literal> action), to be dropped as well. DROP EXTENSIONはデータベースから拡張を削除します。 拡張を削除すると、そのメンバオブジェクトやその他明示的に依存するルーチン(ALTER ROUTINEDEPENDS ON EXTENSION extension_nameの動作を参照してください)も削除されます。

You must own the extension to use <command>DROP EXTENSION</command>. DROP EXTENSIONを使用するためにはその拡張を所有していなければなりません。

パラメータ

<title>Parameters</title>
IF EXISTS

Do not throw an error if the extension does not exist. A notice is issued in this case. 拡張が存在しない場合でもエラーになりません。 この場合注意メッセージが発行されます。

name

The name of an installed extension. インストールされている拡張の名前です。

CASCADE

Automatically drop objects that depend on the extension, and in turn all objects that depend on those objects (see <xref linkend="ddl-depend"/>). 削除する拡張に依存しているオブジェクトを自動的に削除し、さらにそれらのオブジェクトに依存するすべてのオブジェクトも削除します(5.14参照)。

RESTRICT

This option prevents the specified extensions from being dropped if other objects, besides these extensions, their members, and their explicitly dependent routines, depend on them.  This is the default. このオプションは、以下のもの以外の他のオブジェクトが拡張に依存している場合に、指定された拡張を削除しないようにします。ここで、以下のものとは、これらの拡張、そのメンバ、および明示的に依存するルーチンです。 こちらがデフォルトです。

<title>Examples</title>

To remove the extension <literal>hstore</literal> from the current database: 現在のデータベースからhstore拡張を削除します。

DROP EXTENSION hstore;

This command will fail if any of <literal>hstore</literal>'s objects are in use in the database, for example if any tables have columns of the <type>hstore</type> type. Add the <literal>CASCADE</literal> option to forcibly remove those dependent objects as well. 例えば何らかのテーブルがhstore型の列を持つなど、データベース内でhstoreのオブジェクトを使用している場合、このコマンドは失敗します。 こうした依存するオブジェクトも含めて強制的に削除するにはCASCADEを付けてください。

互換性

<title>Compatibility</title>

<command>DROP EXTENSION</command> is a <productname>PostgreSQL</productname> extension. DROP EXTENSIONPostgreSQLの拡張です。

関連項目

<title>See Also</title> CREATE EXTENSION, ALTER EXTENSION