Re: Make name optional in CREATE STATISTICS
Alvaro Herrera <alvherre@alvh.no-ip.org>
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Michael Paquier <michael@paquier.xyz>
Cc: Dean Rasheed <dean.a.rasheed@gmail.com>, Matthias van de Meent <boekewurm+postgres@gmail.com>, Simon Riggs <simon.riggs@enterprisedb.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2022-07-22T13:06:46Z
Lists: pgsql-hackers
Attachments
- v2-0001-Rework-grammar-for-REINDEX.patch (text/x-diff)
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)
Commits
-
Fix a few issues with REINDEX grammar
- 0a5f06b84de7 16.0 landed
-
Rework grammar for REINDEX
- 83011ce7d7f4 16.0 landed
-
parser: centralize common auxiliary productions
- 7d158e8cb44b 16.0 landed
-
Make the name optional in CREATE STATISTICS.
- 624aa2a13bd0 16.0 landed