DROP_FOREIGN_TABLE(7pg13)
π DROP FOREIGN TABLE π
okay so bestie, welcome to the DROP FOREIGN TABLE(7) manual page from the PostgreSQL 13.23 documentation. Itβs giving βremove a foreign tableβ energy, and honestly? Iconic.
πΈ NAME πΈ
DROP_FOREIGN_TABLE β remove a foreign table. periodt.
β¨ SYNOPSIS β¨
DROP FOREIGN TABLE [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]
π DESCRIPTION π
DROP FOREIGN TABLE removes a foreign table. Only the owner of a foreign table can remove it β thatβs the vibe check, no cap.
π PARAMETERS π
IF EXISTSβ Do not throw an error if the foreign table does not exist. A notice is issued in this case. so itβs like βbestie, I got youβ if itβs already gone.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 Section 5.14). yes, Section 5.14, keep up πRESTRICTβ Refuse to drop the foreign table if any objects depend on it. This is the default. the cautious icon behavior π
π EXAMPLES π
To destroy two foreign tables, films and distributors:
DROP FOREIGN TABLE films, distributors;
π¦ COMPATIBILITY π¦
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 IF EXISTS option, which is a PostgreSQL extension. slay, but make it standards-adjacent β¨
π SEE ALSO π
ALTER FOREIGN TABLEβALTER_FOREIGN_TABLE(7)CREATE FOREIGN TABLEβCREATE_FOREIGN_TABLE(7)
π Source/version: PostgreSQL 13.23. Date: 2025. DROP FOREIGN TABLE(7) β bye bestie, slay responsibly π
π¦ where this page comes from
- opensuse-leap 16.0: postgresql13 13.23-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql13 13.23-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql13 13.23-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql13 13.23-160000.1.1 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms