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

DROP LANGUAGE

DROP LANGUAGE <refpurpose>remove a procedural language</refpurpose> — 手続き言語を削除する

概要

DROP [ PROCEDURAL ] LANGUAGE [ IF EXISTS ] name [ CASCADE | RESTRICT ]

説明

<title>Description</title>

<command>DROP LANGUAGE</command> removes the definition of a previously registered procedural language. You must be a superuser or the owner of the language to use <command>DROP LANGUAGE</command>. DROP LANGUAGEは過去に登録された手続き言語の定義を削除します。 DROP LANGUAGEを使用するにはスーパーユーザか言語の所有者でなければなりません。

注記

As of <productname>PostgreSQL</productname> 9.1, most procedural languages have been made into <quote>extensions</quote>, and should therefore be removed with <link linkend="sql-dropextension"><command>DROP EXTENSION</command></link> not <command>DROP LANGUAGE</command>. PostgreSQL 9.1からほとんどの手続き言語は拡張にまとめられましたので、DROP LANGUAGEではなくDROP EXTENSIONを使用して削除すべきです。

パラメータ

<title>Parameters</title>
IF EXISTS

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

name

The name of an existing procedural language. 既存の手続き言語の名前です。

CASCADE

Automatically drop objects that depend on the language (such as functions in the language), and in turn all objects that depend on those objects (see <xref linkend="ddl-depend"/>). その言語に依存するオブジェクト(その言語で記述された関数など)を自動的に削除し、さらにそれらのオブジェクトに依存するすべてのオブジェクトも削除します(5.14参照)。

RESTRICT

Refuse to drop the language if any objects depend on it. This is the default. 依存しているオブジェクトがある場合、その言語の削除を拒否します。 こちらがデフォルトです。

<title>Examples</title>

This command removes the procedural language <literal>plsample</literal>: 次のコマンドはplsampleという手続き言語を削除します。

DROP LANGUAGE plsample;

互換性

<title>Compatibility</title>

There is no <command>DROP LANGUAGE</command> statement in the SQL standard. 標準SQLにはDROP LANGUAGE文はありません。

関連項目

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