NAME
DROP SCHEMA - 删除一个模式
SYNOPSIS
DROP SCHEMA name [, ...] [ CASCADE | RESTRICT ]
DESCRIPTION 描述
DROP SCHEMA 从数据库中删除模式。
模式只能被它的所有者或者超级用户删除。请注意, 所有者即使没有拥有模式中任何对象也可以删除模式(以及模式中的所有对象)。
PARAMETERS 参数
- name
模式的名字。- CASCADE
自动删除包含在模式中的对象(表,函数,等等)。- RESTRICT
如果模式包含任何对象,则拒绝删除它。这个是缺省。
EXAMPLES 例子
从数据库中删除模式 mystuff,以及它包含的所有东西:
DROP SCHEMA mystuff CASCADE;
COMPATIBILITY 兼容性
DROP SCHEMA 和 SQL 标准完全兼容, 只不过标准只允许一条命令删除一个模式。
SEE ALSO 参见
ALTER SCHEMA [alter_schema(7)], CREATE SCHEMA [create_schema(l)]
#p#
NAME
DROP SCHEMA - remove a schema
SYNOPSIS
DROP SCHEMA name [, ...] [ CASCADE | RESTRICT ]
DESCRIPTION
DROP SCHEMA removes schemas from the database.
A schema can only be dropped by its owner or a superuser. Note that the owner can drop the schema (and thereby all contained objects) even if he does not own some of the objects within the schema.
PARAMETERS
- name
- The name of a schema.
- CASCADE
- Automatically drop objects (tables, functions, etc.) that are contained in the schema.
- RESTRICT
- Refuse to drop the schema if it contains any objects. This is the default.
EXAMPLES
To remove schema mystuff from the database, along with everything it contains:
DROP SCHEMA mystuff CASCADE;
COMPATIBILITY
DROP SCHEMA is fully conforming with the SQL standard, except that the standard only allows one schema to be dropped per command.
SEE ALSO
ALTER SCHEMA [alter_schema(7)], CREATE SCHEMA [create_schema(l)]