Re: Make name optional in CREATE STATISTICS

Поиск
Список
Период
Сортировка
От Matthias van de Meent
Тема Re: Make name optional in CREATE STATISTICS
Дата
Msg-id CAEze2WhShe3BvKQZJC19=ER+WuicMPoW0kYCk7sZENimC39J0Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Make name optional in CREATE STATISTICS  (Simon Riggs <simon.riggs@enterprisedb.com>)
Ответы Re: Make name optional in CREATE STATISTICS  (Simon Riggs <simon.riggs@enterprisedb.com>)
Список pgsql-hackers
On Thu, 7 Jul 2022 at 12:55, Simon Riggs <simon.riggs@enterprisedb.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)]

> Patch v4 attached

Thanks for working on this!


Kind regards,

Matthias van de Meent



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Make name optional in CREATE STATISTICS
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Avoid unecessary MemSet call (src/backend/utils/cache/relcache.c)