DROP_STATISTICS
remove extended statistics
- Provided by: postgresql-client-18 (Version: 18.3-1)
- Source: postgresql-18
- Report a bug
remove extended statistics
DROP STATISTICS [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]
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.
IF EXISTS
name
CASCADE
RESTRICT
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;
There is no DROP STATISTICS command in the SQL standard.
ALTER STATISTICS (ALTER_STATISTICS(7)), CREATE STATISTICS (CREATE_STATISTICS(7))