Полезная информация

DROP DOMAIN

Name

DROP DOMAIN  --  remove a user-defined domain

Synopsis

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

Inputs

domainname

The name of an existing domain.

CASCADE

Automatically drop objects that depend on the domain. This behavior is not currently supported.

RESTRICT

Do not drop dependent objects. This is the default.

Outputs

DROP

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.

Notes

Examples

To remove the box domain:

DROP DOMAIN box;

Compatibility

A DROP DOMAIN statement exists in SQL99. As with most other "drop" commands, DROP DOMAIN in SQL99 requires a "drop behavior" clause to select between dropping all dependent objects or refusing to drop if dependent objects exist:

DROP DOMAIN name { CASCADE | RESTRICT }

PostgreSQL accepts only the RESTRICT option, and currently does not check for existence of dependent objects.

See Also

CREATE DOMAIN