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
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/b5913f6120792465f4394b93c15c2e2ac0c08376
Modified Files
--------------
doc/src/sgml/ref/cluster.sgml | 20 +++++++++++
doc/src/sgml/ref/reindex.sgml | 18 +++++++++-
src/backend/commands/cluster.c | 28 ++++++++++++++--
src/backend/commands/indexcmds.c | 36 ++++++++++++++++++++
src/backend/nodes/copyfuncs.c | 4 +--
src/backend/nodes/equalfuncs.c | 4 +--
src/backend/parser/gram.y | 54 +++++++++++++++++-------------
src/backend/tcop/utility.c | 15 +++++----
src/bin/psql/tab-complete.c | 22 +++++++++---
src/include/catalog/index.h | 9 +++++
src/include/commands/cluster.h | 10 +++++-
src/include/commands/defrem.h | 1 +
src/include/nodes/parsenodes.h | 17 ++--------
src/test/regress/expected/create_index.out | 2 +-
src/test/regress/sql/create_index.sql | 2 +-
15 files changed, 180 insertions(+), 62 deletions(-)