postgresql/doc/src/sgml/ref
Alvaro Herrera bc085205c8 Change CREATE STATISTICS syntax
Previously, we had the WITH clause in the middle of the command, where
you'd specify both generic options as well as statistic types.  Few
people liked this, so this commit changes it to remove the WITH keyword
from that clause and makes it accept statistic types only.  (We
currently don't have any generic options, but if we invent in the
future, we will gain a new WITH clause, probably at the end of the
command).

Also, the column list is now specified without parens, which makes the
whole command look more similar to a SELECT command.  This change will
let us expand the command to supporting expressions (not just columns
names) as well as multiple tables and their join conditions.

Tom added lots of code comments and fixed some parts of the CREATE
STATISTICS reference page, too; more changes in this area are
forthcoming.  He also fixed a potential problem in the alter_generic
regression test, reducing verbosity on a cascaded drop to avoid
dependency on message ordering, as we do in other tests.

Tom also closed a security bug: we documented that table ownership was
required in order to create a statistics object on it, but didn't
actually implement it.

Implement tab-completion for statistics objects.  This can stand some
more improvement.

Authors: Alvaro Herrera, with lots of cleanup by Tom Lane
Discussion: https://postgr.es/m/20170420212426.ltvgyhnefvhixm6i@alvherre.pgsql
2017-05-12 14:59:35 -03:00
..
abort.sgml
allfiles.sgml Implement multivariate n-distinct coefficients 2017-03-24 14:06:10 -03:00
alter_aggregate.sgml Allow CURRENT/SESSION_USER to be used in certain commands 2015-03-09 15:41:54 -03:00
alter_collation.sgml doc: Fix oldhtml/old PDF build again 2017-03-27 11:58:52 -04:00
alter_conversion.sgml Allow CURRENT/SESSION_USER to be used in certain commands 2015-03-09 15:41:54 -03:00
alter_database.sgml Order some new options on man pages more sensibly, minor improvements 2015-09-17 20:57:47 -04:00
alter_default_privileges.sgml Altering default privileges on schemas 2017-03-28 18:58:55 +03:00
alter_domain.sgml doc: Add some markup 2017-04-07 22:45:39 -04:00
alter_event_trigger.sgml Allow CURRENT/SESSION_USER to be used in certain commands 2015-03-09 15:41:54 -03:00
alter_extension.sgml Allow referring to functions without arguments when unique 2017-03-14 23:55:19 -04:00
alter_foreign_data_wrapper.sgml Allow CURRENT/SESSION_USER to be used in certain commands 2015-03-09 15:41:54 -03:00
alter_foreign_table.sgml Doc: clarify that DROP ... CASCADE is recursive. 2016-08-12 18:45:18 -04:00
alter_function.sgml Allow referring to functions without arguments when unique 2017-03-14 23:55:19 -04:00
alter_group.sgml Allow CURRENT/SESSION_USER to be used in certain commands 2015-03-09 15:41:54 -03:00
alter_index.sgml Fix broken ALTER INDEX documentation 2016-04-05 19:03:42 -03:00
alter_language.sgml Allow CURRENT/SESSION_USER to be used in certain commands 2015-03-09 15:41:54 -03:00
alter_large_object.sgml Copy-edit the docs changes of OWNER TO CURRENT/SESSION_USER additions. 2015-07-10 14:39:29 +03:00
alter_materialized_view.sgml Fix duplication in ALTER MATERIALIZE VIEW synopsis 2016-11-14 11:14:34 -03:00
alter_opclass.sgml Copy-edit the docs changes of OWNER TO CURRENT/SESSION_USER additions. 2015-07-10 14:39:29 +03:00
alter_operator.sgml Add ALTER OPERATOR command, for changing selectivity estimator functions. 2015-07-14 18:17:55 +03:00
alter_opfamily.sgml Allow referring to functions without arguments when unique 2017-03-14 23:55:19 -04:00
alter_policy.sgml Add support for restrictive RLS policies 2016-12-05 15:50:55 -05:00
alter_publication.sgml Rework the options syntax for logical replication commands 2017-05-12 08:57:49 -04:00
alter_role.sgml Remove support for password_encryption='off' / 'plain'. 2017-05-08 11:26:07 +03:00
alter_rule.sgml
alter_schema.sgml Allow CURRENT/SESSION_USER to be used in certain commands 2015-03-09 15:41:54 -03:00
alter_sequence.sgml doc: Update ALTER SEQUENCE claims about changes being nontransactional 2017-05-02 10:34:49 -04:00
alter_server.sgml Allow CURRENT/SESSION_USER to be used in certain commands 2015-03-09 15:41:54 -03:00
alter_statistics.sgml Change CREATE STATISTICS syntax 2017-05-12 14:59:35 -03:00
alter_subscription.sgml Rework the options syntax for logical replication commands 2017-05-12 08:57:49 -04:00
alter_system.sgml Docs: mention pg_reload_conf() in ALTER SYSTEM reference page. 2016-05-24 14:04:29 -04:00
alter_table.sgml Identity columns 2017-04-06 08:41:37 -04:00
alter_tablespace.sgml Add missing documentation for effective_io_concurrency tablespace option. 2016-12-17 01:25:29 +09:00
alter_trigger.sgml Support ALTER THING .. DEPENDS ON EXTENSION 2016-04-05 18:38:54 -03:00
alter_tsconfig.sgml Allow CURRENT/SESSION_USER to be used in certain commands 2015-03-09 15:41:54 -03:00
alter_tsdictionary.sgml Allow CURRENT/SESSION_USER to be used in certain commands 2015-03-09 15:41:54 -03:00
alter_tsparser.sgml
alter_tstemplate.sgml doc: Improve DocBook XML validity 2014-02-23 21:31:08 -05:00
alter_type.sgml Support renaming an existing value of an enum type. 2016-09-07 16:11:56 -04:00
alter_user_mapping.sgml doc: Correct ALTER USER MAPPING example 2016-09-20 12:00:00 -04:00
alter_user.sgml Remove support for password_encryption='off' / 'plain'. 2017-05-08 11:26:07 +03:00
alter_view.sgml Allow CURRENT/SESSION_USER to be used in certain commands 2015-03-09 15:41:54 -03:00
analyze.sgml Remove duplicated word. 2017-03-07 11:18:56 -05:00
begin.sgml
checkpoint.sgml Replace "transaction log" with "write-ahead log" 2017-05-12 11:52:43 -04:00
close.sgml
cluster.sgml Add GUC and storage parameter to set the maximum size of GIN pending list. 2014-11-11 21:08:21 +09:00
clusterdb.sgml doc: Consistently use = sign in long options synopses 2016-10-19 08:48:48 -04:00
comment.sgml Add COMMENT and SECURITY LABEL support for publications and subscriptions 2017-03-24 23:44:23 -04:00
commit_prepared.sgml
commit.sgml
copy.sgml Identity columns 2017-04-06 08:41:37 -04:00
create_access_method.sgml Doc: copy-editing in create_access_method.sgml. 2016-08-16 11:35:36 -04:00
create_aggregate.sgml Improve user-facing documentation for partial/parallel aggregation. 2016-06-22 19:14:16 -04:00
create_cast.sgml Allow referring to functions without arguments when unique 2017-03-14 23:55:19 -04:00
create_collation.sgml ICU support 2017-03-23 15:28:48 -04:00
create_conversion.sgml
create_database.sgml doc: Update CREATE DATABASE examples 2017-02-06 11:55:39 -05:00
create_domain.sgml doc: Spell checking 2015-09-10 21:35:06 -04:00
create_event_trigger.sgml doc: Tweak synopsis indentation for consistency 2015-09-21 23:31:43 -04:00
create_extension.sgml Doc: minor documentation improvements about extensions. 2016-09-07 13:36:08 -04:00
create_foreign_data_wrapper.sgml
create_foreign_table.sgml Remove unnecessairly duplicated gram.y productions 2017-04-27 20:14:39 -04:00
create_function.sgml Remove createlang and droplang 2017-03-23 14:16:45 -04:00
create_group.sgml Remove support for password_encryption='off' / 'plain'. 2017-05-08 11:26:07 +03:00
create_index.sgml BRIN auto-summarization 2017-04-01 14:00:53 -03:00
create_language.sgml Remove createlang and droplang 2017-03-23 14:16:45 -04:00
create_materialized_view.sgml doc: Fix markup 2014-12-13 14:16:16 -05:00
create_opclass.sgml Replace the built-in GIN array opclasses with a single polymorphic opclass. 2016-09-26 14:52:44 -04:00
create_operator.sgml
create_opfamily.sgml
create_policy.sgml doc: Add some markup 2017-04-07 22:45:39 -04:00
create_publication.sgml Rework the options syntax for logical replication commands 2017-05-12 08:57:49 -04:00
create_role.sgml Remove support for password_encryption='off' / 'plain'. 2017-05-08 11:26:07 +03:00
create_rule.sgml Add support for INSERT ... ON CONFLICT DO NOTHING/UPDATE. 2015-05-08 05:43:10 +02:00
create_schema.sgml Use gender-neutral language in documentation 2015-09-21 22:57:29 -04:00
create_sequence.sgml Add CREATE SEQUENCE AS <data type> clause 2017-02-10 15:34:35 -05:00
create_server.sgml Add IF NOT EXISTS for CREATE SERVER and CREATE USER MAPPING 2017-03-20 16:40:45 -04:00
create_statistics.sgml Change CREATE STATISTICS syntax 2017-05-12 14:59:35 -03:00
create_subscription.sgml Rework the options syntax for logical replication commands 2017-05-12 08:57:49 -04:00
create_table_as.sgml Add CINE option for CREATE TABLE AS and CREATE MATERIALIZED VIEW 2014-12-13 13:56:09 -05:00
create_table.sgml Remove unnecessairly duplicated gram.y productions 2017-04-27 20:14:39 -04:00
create_tablespace.sgml Allow per-tablespace effective_io_concurrency 2015-09-08 12:51:42 -03:00
create_transform.sgml Allow referring to functions without arguments when unique 2017-03-14 23:55:19 -04:00
create_trigger.sgml Fix example on creating a trigger with a transition table. 2017-04-18 11:51:06 +03:00
create_tsconfig.sgml doc: Improve DocBook XML validity 2014-02-23 21:31:08 -05:00
create_tsdictionary.sgml
create_tsparser.sgml
create_tstemplate.sgml
create_type.sgml Make UNKNOWN into an actual pseudo-type. 2017-01-25 09:27:09 -05:00
create_user_mapping.sgml Add IF NOT EXISTS for CREATE SERVER and CREATE USER MAPPING 2017-03-20 16:40:45 -04:00
create_user.sgml Remove support for password_encryption='off' / 'plain'. 2017-05-08 11:26:07 +03:00
create_view.sgml Change unknown-type literals to type text in SELECT and RETURNING lists. 2017-01-25 09:17:24 -05:00
createdb.sgml doc: improve createdb example 2017-03-20 21:23:56 -04:00
createuser.sgml Remove support for password_encryption='off' / 'plain'. 2017-05-08 11:26:07 +03:00
deallocate.sgml
declare.sgml
delete.sgml doc: Update compatibility claim 2017-03-18 14:25:41 -04:00
discard.sgml Improve DISCARD documentation. 2014-08-17 15:59:03 -04:00
do.sgml
drop_access_method.sgml Doc: clarify that DROP ... CASCADE is recursive. 2016-08-12 18:45:18 -04:00
drop_aggregate.sgml Allow dropping multiple functions at once 2017-03-06 13:31:47 -05:00
drop_cast.sgml
drop_collation.sgml Doc: clarify that DROP ... CASCADE is recursive. 2016-08-12 18:45:18 -04:00
drop_conversion.sgml
drop_database.sgml
drop_domain.sgml Doc: clarify that DROP ... CASCADE is recursive. 2016-08-12 18:45:18 -04:00
drop_event_trigger.sgml Doc: clarify that DROP ... CASCADE is recursive. 2016-08-12 18:45:18 -04:00
drop_extension.sgml Doc: clarify that DROP ... CASCADE is recursive. 2016-08-12 18:45:18 -04:00
drop_foreign_data_wrapper.sgml Combine several DROP variants into generic DropStmt 2017-03-06 13:31:47 -05:00
drop_foreign_table.sgml Fix typo in comment 2017-04-14 14:07:44 -04:00
drop_function.sgml Allow referring to functions without arguments when unique 2017-03-14 23:55:19 -04:00
drop_group.sgml
drop_index.sgml Doc: clarify that DROP ... CASCADE is recursive. 2016-08-12 18:45:18 -04:00
drop_language.sgml Remove createlang and droplang 2017-03-23 14:16:45 -04:00
drop_materialized_view.sgml Doc: clarify that DROP ... CASCADE is recursive. 2016-08-12 18:45:18 -04:00
drop_opclass.sgml Doc: clarify that DROP ... CASCADE is recursive. 2016-08-12 18:45:18 -04:00
drop_operator.sgml Allow dropping multiple functions at once 2017-03-06 13:31:47 -05:00
drop_opfamily.sgml Doc: clarify that DROP ... CASCADE is recursive. 2016-08-12 18:45:18 -04:00
drop_owned.sgml Doc: clarify that DROP ... CASCADE is recursive. 2016-08-12 18:45:18 -04:00
drop_policy.sgml Doc: clarify that DROP ... CASCADE is recursive. 2016-08-12 18:45:18 -04:00
drop_publication.sgml Logical replication 2017-01-20 09:04:49 -05:00
drop_role.sgml Improve documentation of the role-dropping process. 2015-10-07 16:12:05 -04:00
drop_rule.sgml Doc: clarify that DROP ... CASCADE is recursive. 2016-08-12 18:45:18 -04:00
drop_schema.sgml Doc: clarify that DROP ... CASCADE is recursive. 2016-08-12 18:45:18 -04:00
drop_sequence.sgml Doc: clarify that DROP ... CASCADE is recursive. 2016-08-12 18:45:18 -04:00
drop_server.sgml Combine several DROP variants into generic DropStmt 2017-03-06 13:31:47 -05:00
drop_statistics.sgml Change CREATE STATISTICS syntax 2017-05-12 14:59:35 -03:00
drop_subscription.sgml Remove the NODROP SLOT option from DROP SUBSCRIPTION 2017-05-09 10:20:42 -04:00
drop_table.sgml Doc: clarify that DROP ... CASCADE is recursive. 2016-08-12 18:45:18 -04:00
drop_tablespace.sgml
drop_transform.sgml Doc: clarify that DROP ... CASCADE is recursive. 2016-08-12 18:45:18 -04:00
drop_trigger.sgml Doc: clarify that DROP ... CASCADE is recursive. 2016-08-12 18:45:18 -04:00
drop_tsconfig.sgml Doc: clarify that DROP ... CASCADE is recursive. 2016-08-12 18:45:18 -04:00
drop_tsdictionary.sgml Doc: clarify that DROP ... CASCADE is recursive. 2016-08-12 18:45:18 -04:00
drop_tsparser.sgml Doc: clarify that DROP ... CASCADE is recursive. 2016-08-12 18:45:18 -04:00
drop_tstemplate.sgml Doc: clarify that DROP ... CASCADE is recursive. 2016-08-12 18:45:18 -04:00
drop_type.sgml Doc: clarify that DROP ... CASCADE is recursive. 2016-08-12 18:45:18 -04:00
drop_user_mapping.sgml Use gender-neutral language in documentation 2015-09-21 22:57:29 -04:00
drop_user.sgml Improve documentation of the role-dropping process. 2015-10-07 16:12:05 -04:00
drop_view.sgml Doc: clarify that DROP ... CASCADE is recursive. 2016-08-12 18:45:18 -04:00
dropdb.sgml
dropuser.sgml doc: Improve DocBook XML validity 2014-02-23 21:31:08 -05:00
ecpg-ref.sgml Fix buffer overflow on particularly named files and clarify documentation about 2016-12-22 08:28:13 +01:00
end.sgml
execute.sgml
explain.sgml Expose explain's SUMMARY option 2017-03-08 15:14:03 -05:00
fetch.sgml
grant.sgml doc: Add some markup 2017-04-07 22:45:39 -04:00
import_foreign_schema.sgml doc: Tweak synopsis indentation for consistency 2015-09-21 23:31:43 -04:00
initdb.sgml Replace "transaction log" with "write-ahead log" 2017-05-12 11:52:43 -04:00
insert.sgml Identity columns 2017-04-06 08:41:37 -04:00
listen.sgml
load.sgml
lock.sgml Allow LOCK TABLE .. ROW EXCLUSIVE MODE with INSERT 2015-05-11 15:44:12 -04:00
move.sgml
notify.sgml doc: Change recommendation to put NOTIFY into a rule 2016-08-03 12:29:15 -04:00
pg_basebackup.sgml Replace "transaction log" with "write-ahead log" 2017-05-12 11:52:43 -04:00
pg_config-ref.sgml docs: remove unnecessary references to old PG versions 2014-02-24 12:56:37 -05:00
pg_controldata.sgml Add -D option to specify data directory to pg_controldata and pg_resetxlog. 2014-09-25 13:37:19 +03:00
pg_ctl-ref.sgml Sync pg_ctl documentation and usage message with reality. 2017-04-20 14:41:55 -04:00
pg_dump.sgml pg_dump: Add --no-publications option 2017-05-12 09:15:40 -04:00
pg_dumpall.sgml pg_dump: Add --no-publications option 2017-05-12 09:15:40 -04:00
pg_isready.sgml docs: Improve pg_isready details about username/dbname 2014-09-06 12:43:11 -04:00
pg_receivewal.sgml Replace "transaction log" with "write-ahead log" 2017-05-12 11:52:43 -04:00
pg_recvlogical.sgml Rename user-facing tools with "xlog" in the name to say "wal". 2017-02-09 16:23:46 -05:00
pg_resetwal.sgml Rename "pg_clog" directory to "pg_xact". 2017-03-17 09:48:38 -04:00
pg_restore.sgml pg_dump: Add --no-publications option 2017-05-12 09:15:40 -04:00
pg_rewind.sgml Rename "pg_clog" directory to "pg_xact". 2017-03-17 09:48:38 -04:00
pg_waldump.sgml Standardize "WAL location" terminology 2017-05-12 13:51:27 -04:00
pgarchivecleanup.sgml doc: Remove some confusion from pg_archivecleanup doc 2016-08-16 15:33:52 -04:00
pgbench.sgml Replace "transaction log" with "write-ahead log" 2017-05-12 11:52:43 -04:00
pgtestfsync.sgml Replace "transaction log" with "write-ahead log" 2017-05-12 11:52:43 -04:00
pgtesttiming.sgml pg_test_timing: Add NLS 2016-11-04 10:40:05 -04:00
pgupgrade.sgml doc: clearify pg_upgrade default copy behavior 2017-04-11 12:14:09 -04:00
postgres-ref.sgml Remove TZ environment-variable entry from postgres reference page. 2016-03-29 21:38:41 -04:00
postmaster.sgml
prepare_transaction.sgml doc: Improve DocBook XML validity 2014-02-23 21:31:08 -05:00
prepare.sgml doc: Remove some trailing whitespace 2016-12-17 09:35:31 -05:00
psql-ref.sgml Doc: clarify behavior of OT_WHOLE_LINE and OT_FILEPIPE psql slash commands. 2017-04-02 19:01:53 -04:00
reassign_owned.sgml Improve documentation of the role-dropping process. 2015-10-07 16:12:05 -04:00
refresh_materialized_view.sgml doc: Improve DocBook XML validity 2014-02-23 21:31:08 -05:00
reindex.sgml Simplify syntax diagram for REINDEX. 2016-02-04 13:58:40 -05:00
reindexdb.sgml doc: Remove some trailing whitespace 2016-12-17 09:35:31 -05:00
release_savepoint.sgml
reset.sgml
revoke.sgml Allow referring to functions without arguments when unique 2017-03-14 23:55:19 -04:00
rollback_prepared.sgml
rollback_to.sgml
rollback.sgml
savepoint.sgml
security_label.sgml Add COMMENT and SECURITY LABEL support for publications and subscriptions 2017-03-24 23:44:23 -04:00
select_into.sgml docs: remove unnecessary references to old PG versions 2014-02-24 12:56:37 -05:00
select.sgml Correct TABLESAMPLE docs 2016-09-09 11:19:21 +01:00
set_constraints.sgml
set_role.sgml doc: more replacement of <literal> with something better 2016-08-24 21:11:44 -04:00
set_session_auth.sgml doc: more replacement of <literal> with something better 2016-08-24 21:11:44 -04:00
set_transaction.sgml
set.sgml
show.sgml
start_transaction.sgml
truncate.sgml doc: Update compatibility claim 2017-03-18 14:25:41 -04:00
unlisten.sgml doc: Improve DocBook XML validity 2014-02-23 21:31:08 -05:00
update.sgml doc: Improve documentation related to table partitioning feature. 2016-12-13 08:18:00 -05:00
vacuum.sgml Simplify the example of VACUUM in documentation. 2017-03-31 01:31:15 +09:00
vacuumdb.sgml doc: Consistently use = sign in long options synopses 2016-10-19 08:48:48 -04:00
values.sgml doc: add link for list-of-scalars mention 2016-06-28 16:16:06 -04:00