1ALTER STATISTICS(7)      PostgreSQL 13.4 Documentation     ALTER STATISTICS(7)
2
3
4

NAME

6       ALTER_STATISTICS - change the definition of an extended statistics
7       object
8

SYNOPSIS

10       ALTER STATISTICS name OWNER TO { new_owner | CURRENT_USER | SESSION_USER }
11       ALTER STATISTICS name RENAME TO new_name
12       ALTER STATISTICS name SET SCHEMA new_schema
13       ALTER STATISTICS name SET STATISTICS new_target
14

DESCRIPTION

16       ALTER STATISTICS changes the parameters of an existing extended
17       statistics object. Any parameters not specifically set in the ALTER
18       STATISTICS command retain their prior settings.
19
20       You must own the statistics object to use ALTER STATISTICS. To change a
21       statistics object's schema, you must also have CREATE privilege on the
22       new schema. To alter the owner, you must also be a direct or indirect
23       member of the new owning role, and that role must have CREATE privilege
24       on the statistics object's schema. (These restrictions enforce that
25       altering the owner doesn't do anything you couldn't do by dropping and
26       recreating the statistics object. However, a superuser can alter
27       ownership of any statistics object anyway.)
28

PARAMETERS

30       name
31           The name (optionally schema-qualified) of the statistics object to
32           be altered.
33
34       new_owner
35           The user name of the new owner of the statistics object.
36
37       new_name
38           The new name for the statistics object.
39
40       new_schema
41           The new schema for the statistics object.
42
43       new_target
44           The statistic-gathering target for this statistics object for
45           subsequent ANALYZE(7) operations. The target can be set in the
46           range 0 to 10000; alternatively, set it to -1 to revert to using
47           the maximum of the statistics target of the referenced columns, if
48           set, or the system default statistics target
49           (default_statistics_target). For more information on the use of
50           statistics by the PostgreSQL query planner, refer to Section 14.2.
51

COMPATIBILITY

53       There is no ALTER STATISTICS command in the SQL standard.
54

SEE ALSO

56       CREATE STATISTICS (CREATE_STATISTICS(7)), DROP STATISTICS
57       (DROP_STATISTICS(7))
58
59
60
61PostgreSQL 13.4                      2021                  ALTER STATISTICS(7)
Impressum