pgsql: Refactor CLUSTER and REINDEX grammar to use DefElem for option l

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Refactor CLUSTER and REINDEX grammar to use DefElem for option l
Date: 2020-12-03 01:13:35
Message-ID: E1kkdBf-0006gs-45@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Dean Rasheed 2020-12-03 10:06:57 pgsql: Improve estimation of OR clauses using extended statistics.
Previous Message Stephen Frost 2020-12-02 19:42:17 pgsql: Add GSS information to connection authorized log message