Refactor CLUSTER and REINDEX grammar to use DefElem for option lists
Michael Paquier <michael@paquier.xyz>
Refactor CLUSTER and REINDEX grammar to use DefElem for option lists This changes CLUSTER and REINDEX so as a parenthesized grammar becomes possible for options, while unifying the grammar parsing rules for option lists with the existing ones. This is a follow-up of the work done in 873ea9e for VACUUM, ANALYZE and EXPLAIN. This benefits REINDEX for a potential backend-side filtering for collatable-sensitive indexes and TABLESPACE, while CLUSTER would benefit from the latter. Author: Alexey Kondratov, Justin Pryzby Discussion: https://postgr.es/m/8a8f5f73-00d3-55f8-7583-1375ca8f6a91@postgrespro.ru
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/ref/cluster.sgml | modified | +20 −0 |
| doc/src/sgml/ref/reindex.sgml | modified | +17 −1 |
| src/backend/commands/cluster.c | modified | +25 −3 |
| src/backend/commands/indexcmds.c | modified | +36 −0 |
| src/backend/nodes/copyfuncs.c | modified | +2 −2 |
| src/backend/nodes/equalfuncs.c | modified | +2 −2 |
| src/backend/parser/gram.y | modified | +30 −24 |
| src/backend/tcop/utility.c | modified | +8 −7 |
| src/bin/psql/tab-complete.c | modified | +17 −5 |
| src/include/catalog/index.h | modified | +9 −0 |
| src/include/commands/cluster.h | modified | +9 −1 |
| src/include/commands/defrem.h | modified | +1 −0 |
| src/include/nodes/parsenodes.h | modified | +2 −15 |
| src/test/regress/expected/create_index.out | modified | +1 −1 |
| src/test/regress/sql/create_index.sql | modified | +1 −1 |
Documentation touched
Discussion
- Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on the fly 173 messages · 2018-12-24 → 2021-04-21