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

DROP DOMAIN

DROP DOMAIN <refpurpose>remove a domain</refpurpose> — ドメインを削除する

概要

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

説明

<title>Description</title>

<command>DROP DOMAIN</command> removes a domain. Only the owner of a domain can remove it. DROP DOMAINはドメインを削除します。 ドメインを削除できるのは、ドメインの所有者のみです。

パラメータ

<title>Parameters</title>
IF EXISTS

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

name

The name (optionally schema-qualified) of an existing domain. 既存のドメインの名前です(スキーマ修飾名も可)。

CASCADE

Automatically drop objects that depend on the domain (such as table columns), and in turn all objects that depend on those objects (see <xref linkend="ddl-depend"/>). ドメインに依存するオブジェクト(テーブルの列など)を自動的に削除し、さらにそれらのオブジェクトに依存するすべてのオブジェクトも削除します(5.14参照)。

RESTRICT

Refuse to drop the domain if any objects depend on it. This is the default. 依存しているオブジェクトがある場合、そのドメインの削除要求を拒否します。 これがデフォルトです。

<title>Examples</title>

To remove the domain <type>box</type>: ドメインboxを削除します。

DROP DOMAIN box;

互換性

<title>Compatibility</title>

This command conforms to the SQL standard, except for the <literal>IF EXISTS</literal> option, which is a <productname>PostgreSQL</productname> extension. このコマンドは、PostgreSQLの拡張であるIF EXISTSオプションを除き、標準SQLに準拠しています。

関連項目

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