Re: Make name optional in CREATE STATISTICS

From: Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)com>
To: Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Make name optional in CREATE STATISTICS
Date: 2022-07-13 06:07:46
Message-ID: CANbhV-HRr3nTNd1M_Tro5vXcdf1OSWTZVwgJO2Grr3S0bTmmGA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 7 Jul 2022 at 11:58, Matthias van de Meent
<boekewurm+postgres(at)gmail(dot)com> wrote:
>
> On Thu, 7 Jul 2022 at 12:55, Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)com> wrote:
> > There are various other ways of doing this and, yes, we could refactor
> > other parts of the grammar to make this work. There is a specific
> > guideline about patch submission that says the best way to get a patch
> > rejected is to include unnecessary changes. With that in mind, let's
> > keep the patch simple and exactly aimed at the original purpose.
> >
> > I'll leave it for committers to decide whether other refactoring is wanted.
>
> Fair enough.
>
> > I have made the comment show that the name is optional, thank you.
>
> The updated comment implies that IF NOT EXISTS is allowed without a
> defined name, which is false:
>
> > + * CREATE STATISTICS [IF NOT EXISTS] [stats_name] [(stat types)]
>
> A more correct version would be
>
> + * CREATE STATISTICS [ [IF NOT EXISTS] stats_name ]
> [(stat types)]

There you go

--
Simon Riggs http://www.EnterpriseDB.com/

Attachment Content-Type Size
create_stats_opt_name.v5.patch application/octet-stream 17.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2022-07-13 06:39:45 Re: [RFC] building postgres with meson -v9
Previous Message Michael Paquier 2022-07-13 05:54:18 Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths