Refactor CLUSTER and REINDEX grammar to use DefElem for option lists
authorMichael Paquier <[email protected]>
Thu, 3 Dec 2020 01:13:21 +0000 (10:13 +0900)
committerMichael Paquier <[email protected]>
Thu, 3 Dec 2020 01:13:21 +0000 (10:13 +0900)
commitb5913f6120792465f4394b93c15c2e2ac0c08376
tree2b1f33655d3b7f1888487b87ad467483a5b57cbd
parentdc11f31a1a891f8aa8890644e837556bcc5a75e7
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
15 files changed:
doc/src/sgml/ref/cluster.sgml
doc/src/sgml/ref/reindex.sgml
src/backend/commands/cluster.c
src/backend/commands/indexcmds.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/parser/gram.y
src/backend/tcop/utility.c
src/bin/psql/tab-complete.c
src/include/catalog/index.h
src/include/commands/cluster.h
src/include/commands/defrem.h
src/include/nodes/parsenodes.h
src/test/regress/expected/create_index.out
src/test/regress/sql/create_index.sql