Postgresql 中文操作指南
Description
DROP STATISTICS 从数据库中移除统计信息对象。只有统计信息对象的拥有者、架构所有者或超级用户可以删除统计信息对象。
DROP STATISTICS removes statistics object(s) from the database. Only the statistics object’s owner, the schema owner, or a superuser can drop a statistics object.
Parameters
-
IF EXISTS
-
Do not throw an error if the statistics object does not exist. A notice is issued in this case.
-
-
name
-
The name (optionally schema-qualified) of the statistics object to drop.
-
-
CASCADE__RESTRICT
-
These key words do not have any effect, since there are no dependencies on statistics.
-
Examples
在不同的架构中销毁两个统计信息对象,如果它们不存在,则不会失败:
To destroy two statistics objects in different schemas, without failing if they don’t exist:
DROP STATISTICS IF EXISTS
accounting.users_uid_creation,
public.grants_user_role;