Title: DROP STATISTICS Author: The PostgreSQL Global Development Group Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/> Date: 2018 Manual: PostgreSQL 10.6 Documentation Source: PostgreSQL 10.6 Language: English
NAMEDROP_STATISTICS - remove extended statistics
DROP STATISTICS [ IF EXISTS ] name [, ...]
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.
- Do not throw an error if the statistics object does not exist. A notice is issued in this case.
- The name (optionally schema-qualified) of the statistics object to drop.
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.