]> begriffs open source - ai-pg/blob - full-docs/man7/DROP_STATISTICS.7
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / man7 / DROP_STATISTICS.7
1 '\" t
2 .\"     Title: DROP STATISTICS
3 .\"    Author: The PostgreSQL Global Development Group
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
5 .\"      Date: 2025
6 .\"    Manual: PostgreSQL 18.0 Documentation
7 .\"    Source: PostgreSQL 18.0
8 .\"  Language: English
9 .\"
10 .TH "DROP STATISTICS" "7" "2025" "PostgreSQL 18.0" "PostgreSQL 18.0 Documentation"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el       .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 DROP_STATISTICS \- remove extended statistics
32 .SH "SYNOPSIS"
33 .sp
34 .nf
35 DROP STATISTICS [ IF EXISTS ] \fIname\fR [, \&.\&.\&.] [ CASCADE | RESTRICT ]
36 .fi
37 .SH "DESCRIPTION"
38 .PP
39 \fBDROP STATISTICS\fR
40 removes statistics object(s) from the database\&. Only the statistics object\*(Aqs owner, the schema owner, or a superuser can drop a statistics object\&.
41 .SH "PARAMETERS"
42 .PP
43 IF EXISTS
44 .RS 4
45 Do not throw an error if the statistics object does not exist\&. A notice is issued in this case\&.
46 .RE
47 .PP
48 \fIname\fR
49 .RS 4
50 The name (optionally schema\-qualified) of the statistics object to drop\&.
51 .RE
52 .PP
53 CASCADE
54 .br
55 RESTRICT
56 .RS 4
57 These key words do not have any effect, since there are no dependencies on statistics\&.
58 .RE
59 .SH "EXAMPLES"
60 .PP
61 To destroy two statistics objects in different schemas, without failing if they don\*(Aqt exist:
62 .sp
63 .if n \{\
64 .RS 4
65 .\}
66 .nf
67 DROP STATISTICS IF EXISTS
68     accounting\&.users_uid_creation,
69     public\&.grants_user_role;
70 .fi
71 .if n \{\
72 .RE
73 .\}
74 .SH "COMPATIBILITY"
75 .PP
76 There is no
77 \fBDROP STATISTICS\fR
78 command in the SQL standard\&.
79 .SH "SEE ALSO"
80 ALTER STATISTICS (\fBALTER_STATISTICS\fR(7)), CREATE STATISTICS (\fBCREATE_STATISTICS\fR(7))