Re: Make name optional in CREATE STATISTICS

Pavel Stehule <pavel.stehule@gmail.com>

From: Pavel Stehule <pavel.stehule@gmail.com>
To: Simon Riggs <simon.riggs@enterprisedb.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2022-05-15T14:12:33Z
Lists: pgsql-hackers
ne 15. 5. 2022 v 14:20 odesílatel Simon Riggs <simon.riggs@enterprisedb.com>
napsal:

> Currently, CREATE STATS requires you to think of a name for each stats
> object, which is fairly painful, so users would prefer an
> automatically assigned name.
>
> Attached patch allows this, which turns out to be very simple, since a
> name assignment function already exists.
>
> The generated name is simple, but that's exactly what users do anyway,
> so it is not too bad.
>
>
good idea

Pavel


> Tests, docs included.
>
> --
> Simon Riggs                http://www.EnterpriseDB.com/
>

Commits

  1. Fix a few issues with REINDEX grammar

  2. Rework grammar for REINDEX

  3. parser: centralize common auxiliary productions

  4. Make the name optional in CREATE STATISTICS.