Re: Make name optional in CREATE STATISTICS - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Make name optional in CREATE STATISTICS
Date
Msg-id 20220722130646.3da5oh7tgz5qgooi@alvherre.pgsql
Whole thread Raw
In response to Re: Make name optional in CREATE STATISTICS  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Make name optional in CREATE STATISTICS
List pgsql-hackers
On 2022-Jul-22, Michael Paquier wrote:

> So this indeed has as effect to make possible the use of CONCURRENTLY
> for DATABASE and SYSTEM only within the parenthesized grammar.  Seeing
> the simplifications this creates, I'd agree with dropping this part of
> the grammar.

Actually, looking at the grammar again I realized that the '('options')'
part could be refactored; and with that, keeping an extra production for
REINDEX DATABASE CONCURRENTLY is short enough.  It is removed from
REINDEX SYSTEM, but that's OK because that doesn't work anyway.

I added the new test lines you proposed and amended the docs; the result
is attached.

Initially I wanted to use the "optional list of options" for all
utilities that have similar constructions, (VACUUM, ANALYZE, CLUSTER,
EXPLAIN) but it is not possible because their alternative productions
accept different keywords, so it doesn't look possible.

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
"If you have nothing to say, maybe you need just the right tool to help you
not say it."                   (New York Times, about Microsoft PowerPoint)

Attachment

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: proposal - enhancing plpgsql's FOREACH statement for support json type
Next
From: Matthias van de Meent
Date:
Subject: Re: Pluggable toaster