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

DROP FOREIGN TABLE

DROP FOREIGN TABLE <refpurpose>remove a foreign table</refpurpose> — 外部テーブルを削除する

概要

DROP FOREIGN TABLE [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]

説明

<title>Description</title>

<command>DROP FOREIGN TABLE</command> removes a foreign table. Only the owner of a foreign table can remove it. DROP FOREIGN TABLEは外部テーブルを削除します。 外部テーブルの所有者のみが削除することができます。

パラメータ

<title>Parameters</title>
IF EXISTS

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

name

The name (optionally schema-qualified) of the foreign table to drop. 削除する外部テーブルの名前です(スキーマ修飾名も可)。

CASCADE

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

RESTRICT

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

<title>Examples</title>

To destroy two foreign tables, <literal>films</literal> and <literal>distributors</literal>: filmsおよびdistributorsという2つの外部テーブルを破棄します。

DROP FOREIGN TABLE films, distributors;

互換性

<title>Compatibility</title>

This command conforms to ISO/IEC 9075-9 (SQL/MED), except that the standard only allows one foreign table to be dropped per command, and apart from the <literal>IF EXISTS</literal> option, which is a <productname>PostgreSQL</productname> extension. このコマンドは、ISO/IEC 9075-9 (SQL/MED)では1つのコマンドで1つの外部テーブルのみを削除できるという点、および、PostgreSQLの拡張であるIF EXISTSオプションを除き、この標準に従います。

関連項目

<title>See Also</title> ALTER FOREIGN TABLE, CREATE FOREIGN TABLE