Re: multivariate statistics v9

Tomas Vondra <tomas.vondra@2ndquadrant.com>

From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: pgsql-hackers@postgresql.org
Date: 2016-01-19T04:24:07Z
Lists: pgsql-hackers

Attachments

Hi,

attached is v9 of the patch series, including mostly these changes:

1) CREATE STATISTICS cleanup

    Firstly, I forgot to make the STATISTICS keyword unreserved again.
    I've also removed additional stuff from the grammar that turned out
    to be unnecessary / could be replaced with existing pieces.

2) making statistics schema-specific

    Similarly to the other objects (e.g. types), statistics names are now
    unique within a schema. This also means that the statistics may be
    created using qualified name, and also may belong to a different
    schema than a table.

    It seems to me we probably also need to track owner, and only allow
    the owner (or superuser / schema owner) to manipulate the statistics.

    The initial intention was to inherit all this from the parent table,
    but as we're designing this for the multi-table case, it's not
    really working anymore.

3) adding IF [NOT] EXISTS to DROP STATISTICS / CREATE STATISTICS

4) basic documentation of the DDL commands

    It's really simple at this point and some of the paragraphs are
    still empty. I also think that we'll have to add stuff explaining
    how to use statistics, not just docs for the DDL commands.

5) various fixes of the regression tests, related to the above


regards

--
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Commits

  1. Collect and use multi-column dependency stats

  2. Implement SortSupport for macaddr data type

  3. Implement multivariate n-distinct coefficients

  4. Generate fmgr prototypes automatically