Removes a connection registration. External tables registered through this connection must be dropped or relocated first.
DROP CONNECTION [IF EXISTS] <name>
## Overview DROP CONNECTION removes the external_connections row. The credential or credential-storage references are not cascaded; the vault entries and backends those ids point to are left in place. ## Behavior - The HTTP adapter calls DELETE /connections/{name}. Without IF EXISTS, a 404 raises an error; with IF EXISTS, returns false. - External-table registrations that resolve through this connection become unreadable after DROP. They are not automatically removed; list via catalog queries and drop or reregister first. - The credential and credential-storage references are not cascaded. The vault entries and backends those ids pointed to are unaffected. ## Access Control Requires the admin role. The Control Plane enforces connections:write on DELETE /connections/{name}. ## Compatibility DeltaForge extension.
| Name | Type | Description |
|---|---|---|
name | Specifies the name of the connection. | |
if_exists | When true, a missing connection is a clean no-op. |
-- Drop an unused connection
DROP CONNECTION old_pg;
-- Idempotent cleanup
DROP CONNECTION IF EXISTS scratch_conn;