Supported Versions: Current (17) / 16 / 15 / 14 / 13
Development Versions: devel
Unsupported versions: 12 / 11 / 10 / 9.6 / 9.5 / 9.4 / 9.3 / 9.2 / 9.1 / 9.0 / 8.4 / 8.3 / 8.2 / 8.1 / 8.0 / 7.4 / 7.3
This documentation is for an unsupported version of PostgreSQL.
You may want to view the same page for the current version, or one of the other supported versions listed above instead.

DROP DOMAIN

Name

DROP DOMAIN  --  remove a user-defined domain

Synopsis

DROP DOMAIN domainname [, ...]  [ CASCADE | RESTRICT ]
  

Inputs

domainname

The name (optionally schema-qualified) of an existing domain.

CASCADE

Automatically drop objects that depend on the domain (such as table columns).

RESTRICT

Refuse to drop the domain if there are any dependent objects. This is the default.

Outputs

DROP DOMAIN

The message returned if the command is successful.

ERROR: RemoveDomain: type 'domainname' does not exist

This message occurs if the specified domain (or type) is not found.

Description

DROP DOMAIN will remove a user domain from the system catalogs.

Only the owner of a domain can remove it.

Examples

To remove the box domain:

DROP DOMAIN box;

Compatibility

SQL92

See Also

CREATE DOMAIN