postgresql/src/backend/commands
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
..
aggregatecmds.c Improve castNode notation by introducing list-extraction-specific variants. 2017-04-10 13:51:53 -04:00
alter.c Implement multivariate n-distinct coefficients 2017-03-24 14:06:10 -03:00
amcmds.c Fix typos in comments. 2017-02-06 11:33:58 +02:00
analyze.c Faster expression evaluation and targetlist projection. 2017-03-25 14:52:06 -07:00
async.c Improve castNode notation by introducing list-extraction-specific variants. 2017-04-10 13:51:53 -04:00
cluster.c In rebuild_relation(), don't access an already-closed relcache entry. 2017-03-04 16:09:33 -05:00
collationcmds.c Improve castNode notation by introducing list-extraction-specific variants. 2017-04-10 13:51:53 -04:00
comment.c Allow COMMENT ON COLUMN with partitioned tables 2017-04-18 10:42:10 +01:00
constraint.c Allow index AMs to cache data across aminsert calls within a SQL command. 2017-02-09 11:52:12 -05:00
conversioncmds.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
copy.c Revert "Permit dump/reload of not-too-large >1GB tuples" 2017-05-10 18:41:27 -03:00
createas.c Improve castNode notation by introducing list-extraction-specific variants. 2017-04-10 13:51:53 -04:00
dbcommands.c Cleanup slots during drop database 2017-03-28 10:05:21 -04:00
define.c Logical replication 2017-01-20 09:04:49 -05:00
discard.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
dropcmds.c Improve castNode notation by introducing list-extraction-specific variants. 2017-04-10 13:51:53 -04:00
event_trigger.c Cast result of copyObject() to correct type 2017-03-28 21:59:23 -04:00
explain.c Improve castNode notation by introducing list-extraction-specific variants. 2017-04-10 13:51:53 -04:00
extension.c Ensure commands in extension scripts see the results of preceding DDL. 2017-05-02 18:06:09 -04:00
foreigncmds.c Improve castNode notation by introducing list-extraction-specific variants. 2017-04-10 13:51:53 -04:00
functioncmds.c Improve castNode notation by introducing list-extraction-specific variants. 2017-04-10 13:51:53 -04:00
indexcmds.c Faster expression evaluation and targetlist projection. 2017-03-25 14:52:06 -07:00
lockcmds.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
Makefile Implement multivariate n-distinct coefficients 2017-03-24 14:06:10 -03:00
matview.c Improve castNode notation by introducing list-extraction-specific variants. 2017-04-10 13:51:53 -04:00
opclasscmds.c Improve castNode notation by introducing list-extraction-specific variants. 2017-04-10 13:51:53 -04:00
operatorcmds.c Replace LookupFuncNameTypeNames() with LookupFuncWithArgs() 2017-03-06 13:31:47 -05:00
policy.c Provide CatalogTupleDelete() as a wrapper around simple_heap_delete(). 2017-02-01 16:13:30 -05:00
portalcmds.c Improve castNode notation by introducing list-extraction-specific variants. 2017-04-10 13:51:53 -04:00
prepare.c Improve castNode notation by introducing list-extraction-specific variants. 2017-04-10 13:51:53 -04:00
proclang.c Provide CatalogTupleDelete() as a wrapper around simple_heap_delete(). 2017-02-01 16:13:30 -05:00
publicationcmds.c Rework the options syntax for logical replication commands 2017-05-12 08:57:49 -04:00
schemacmds.c Add infrastructure to support EphemeralNamedRelation references. 2017-03-31 23:17:18 -05:00
seclabel.c Remove objname/objargs split for referring to objects 2017-03-06 13:31:47 -05:00
sequence.c Avoid unnecessary catalog updates in ALTER SEQUENCE 2017-05-02 10:41:48 -04:00
statscmds.c Change CREATE STATISTICS syntax 2017-05-12 14:59:35 -03:00
subscriptioncmds.c Rework the options syntax for logical replication commands 2017-05-12 08:57:49 -04:00
tablecmds.c Fix VALIDATE CONSTRAINT to consider NO INHERIT attribute. 2017-04-28 14:48:38 -04:00
tablespace.c Remove useless duplicate inclusions of system header files. 2017-02-25 16:12:55 -05:00
trigger.c Prohibit transition tables on views and foreign tables. 2017-05-09 23:34:02 -04:00
tsearchcmds.c Use wrappers of PG_DETOAST_DATUM_PACKED() more. 2017-03-12 19:35:34 -04:00
typecmds.c Remove objname/objargs split for referring to objects 2017-03-06 13:31:47 -05:00
user.c Remove support for password_encryption='off' / 'plain'. 2017-05-08 11:26:07 +03:00
vacuum.c Track the oldest XID that can be safely looked up in CLOG. 2017-03-23 14:26:31 -04:00
vacuumlazy.c Make VACUUM VERBOSE report the number of skipped frozen pages. 2017-03-25 02:39:44 +09:00
variable.c Remove now-dead code for !HAVE_INT64_TIMESTAMP. 2017-02-23 14:04:43 -05:00
view.c Improve castNode notation by introducing list-extraction-specific variants. 2017-04-10 13:51:53 -04:00