Re: Make name optional in CREATE STATISTICS

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Make name optional in CREATE STATISTICS
Дата
Msg-id 20220721174212.cmitjpuimx6ssyyj@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: Make name optional in CREATE STATISTICS  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Ответы Re: Make name optional in CREATE STATISTICS  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Re: Make name optional in CREATE STATISTICS  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
On 2022-Jul-21, Dean Rasheed wrote:

> I tend to agree with Matthias' earlier point about avoiding code
> duplication in the grammar. Without going off and refactoring other
> parts of the grammar not related to this patch, it's still a slightly
> smaller, simpler change, and less code duplication, to do this using a
> new opt_stats_name production in the grammar, as in the attached.
> 
> I also noticed a comment in CreateStatistics() that needed updating.
> 
> Barring any further comments, I'll push this shortly.

Thanks.  I was looking at the recently modified REINDEX syntax and
noticed there another spot for taking an optional name.  I ended up
reusing OptSchemaName for that, as in the attached patch.  I think
adding production-specific additional productions is pointless and
probably bloats the grammar.  So let me +1 your push of the patch you
posted, just to keep things moving forward, but in addition I propose to
later rename OptSchemaName to something more generic and use it in these
three places.

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/

Вложения

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

Предыдущее
От: Martin Kalcher
Дата:
Сообщение: Re: [PATCH] Introduce array_shuffle() and array_sample()
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: First draft of the PG 15 release notes