Contents
DROP DOMAIN
A DDL command for removing a domain
DROP DOMAIN
is a DDL command for removing a domain.
DROP DOMAIN
was added in PostgreSQL 7.3.
Change history
- PostgreSQL 8.2
DROP DOMAIN IF EXISTS ...
syntax added (commit daea4d8e)
- PostgreSQL 7.3
- added (commit 01c76f74)
Examples
Attempting to drop a domain which is in use:
postgres=# DROP DOMAIN git_sha1 ; ERROR: cannot drop type git_sha1 because other objects depend on it DETAIL: column commit_ref of table repo_commit_ref depends on type git_sha1 HINT: Use DROP ... CASCADE to drop the dependent objects too.
Dropping a domain which is in use:
postgres=# DROP DOMAIN git_sha1 CASCADE; NOTICE: drop cascades to column commit_ref of table repo_commit_ref DROP DOMAIN
References
- PostgreSQL documentation: DROP DOMAIN