NAME
DROP TYPE - 删除一个用户定义数据类型
SYNOPSIS
DROP TYPE name [, ...] [ CASCADE | RESTRICT ]
DESCRIPTION 描述
DROP TYPE 将从系统表里删除用户定义的类型。 只有类型所有者可以删除类型。
PARAMETERS 参数
- name
要删除的类型名(可以有模式修饰)。- CASCADE
自动删除依赖该类型的对象(比如表字段,函数,操作符等等)。- RESTRICT
如果有依赖对象,则拒绝删除该类型。这个是缺省。
EXAMPLES 例子
删除 box 类型:
DROP TYPE box;
COMPATIBILITY 兼容性
这条命令类似于 SQL 标准里对应的命令,但是要注意,PostgreSQL 里的 CREATE TYPE 命令和数据类型扩展机制是和 SQL 标准里不同的。
SEE ALSO 参见
CREATE TYPE [create_type(7)]
#p#
NAME
DROP TYPE - remove a data type
SYNOPSIS
DROP TYPE name [, ...] [ CASCADE | RESTRICT ]
DESCRIPTION
DROP TYPE will remove a user-defined data type. Only the owner of a type can remove it.
PARAMETERS
- name
- The name (optionally schema-qualified) of the data type to remove.
- CASCADE
- Automatically drop objects that depend on the type (such as table columns, functions, operators).
- RESTRICT
- Refuse to drop the type if any objects depend on it. This is the default.
EXAMPLES
To remove the data type box:
DROP TYPE box;
COMPATIBILITY
This command is similar to the corresponding command in the SQL standard, but note that the CREATE TYPE command and the data type extension mechanisms in PostgreSQL differ from the SQL standard.
SEE ALSO
CREATE TYPE [create_type(7)]