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

DROP OPERATOR

DROP OPERATOR <refpurpose>remove an operator</refpurpose> — 演算子を削除する

概要

DROP OPERATOR [ IF EXISTS ] name ( { left_type | NONE } , right_type ) [, ...] [ CASCADE | RESTRICT ]

説明

<title>Description</title>

<command>DROP OPERATOR</command> drops an existing operator from the database system. To execute this command you must be the owner of the operator. DROP OPERATORはデータベースシステムから既存の演算子を削除します。 このコマンドを実行するには、その演算子の所有者でなければなりません。

パラメータ

<title>Parameters</title>
IF EXISTS

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

name

The name (optionally schema-qualified) of an existing operator. 既存の演算子の名前です(スキーマ修飾名も可)。

left_type

The data type of the operator's left operand; write <literal>NONE</literal> if the operator has no left operand. 演算子の左オペランドのデータ型です。 演算子に左オペランドがない場合は、NONEと記述します。

right_type

The data type of the operator's right operand. 演算子の右オペランドのデータ型です。

CASCADE

Automatically drop objects that depend on the operator (such as views using it), and in turn all objects that depend on those objects (see <xref linkend="ddl-depend"/>). 演算子に依存するオブジェクト(その演算子を使用するビューなど)を自動的に削除し、さらにそれらのオブジェクトに依存するすべてのオブジェクトも削除します(5.14参照)。

RESTRICT

Refuse to drop the operator if any objects depend on it. This is the default. 依存するオブジェクトがある場合、演算子の削除を拒否します。 これがデフォルトです。

<title>Examples</title>

Remove the power operator <literal>a^b</literal> for type <type>integer</type>: integer型の累乗を求める演算子a^nを削除します。

DROP OPERATOR ^ (integer, integer);

Remove the bitwise-complement prefix operator <literal>~b</literal> for type <type>bit</type>: bit型のビット列の補数を求める前置演算子~bを削除します。

DROP OPERATOR ~ (none, bit);

Remove multiple operators in one command: 複数の演算子を1つのコマンドで削除します。

DROP OPERATOR ~ (none, bit), ^ (integer, integer);

互換性

<title>Compatibility</title>

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

関連項目

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