t
Title: DROP STATISTICS
Author: The PostgreSQL Global Development Group
Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
Date: 2021
Manual: PostgreSQL 10.19 Documentation
Source: PostgreSQL 10.19
Language: English

"DROP STATISTICS" "7" "2021" "PostgreSQL 10.19" "PostgreSQL 10.19 Documentation"
-----------------------------------------------------------------
* Define some portability stuff
-----------------------------------------------------------------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://bugs.debian.org/507673
http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----------------------------------------------------------------
* set default formatting
-----------------------------------------------------------------
disable hyphenation
disable justification (adjust text to left margin only)
-----------------------------------------------------------------
* MAIN CONTENT STARTS HERE *
-----------------------------------------------------------------
"NAME"
DROP_STATISTICS - remove extended statistics
"SYNOPSIS"
DROP STATISTICS [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]
"DESCRIPTION"

DROP STATISTICS removes statistics object(s) from the database. Only the statistics object\*(Aqs 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\*(Aqt exist:

.\}

DROP STATISTICS IF EXISTS
 accounting.users_uid_creation,
 public.grants_user_role;
.\}
"COMPATIBILITY"

There is no DROP STATISTICS command in the SQL standard.

"SEE ALSO"
ALTER STATISTICS (ALTER_STATISTICS(7)), CREATE STATISTICS (CREATE_STATISTICS(7))