mirror of
https://github.com/postgres/postgres.git
synced 2025-07-14 08:21:07 +03:00
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
This commit is contained in:
@ -3349,7 +3349,7 @@ _copyClusterStmt(const ClusterStmt *from)
|
||||
|
||||
COPY_NODE_FIELD(relation);
|
||||
COPY_STRING_FIELD(indexname);
|
||||
COPY_SCALAR_FIELD(options);
|
||||
COPY_NODE_FIELD(params);
|
||||
|
||||
return newnode;
|
||||
}
|
||||
@ -4443,7 +4443,7 @@ _copyReindexStmt(const ReindexStmt *from)
|
||||
COPY_SCALAR_FIELD(kind);
|
||||
COPY_NODE_FIELD(relation);
|
||||
COPY_STRING_FIELD(name);
|
||||
COPY_SCALAR_FIELD(options);
|
||||
COPY_NODE_FIELD(params);
|
||||
|
||||
return newnode;
|
||||
}
|
||||
|
@ -1210,7 +1210,7 @@ _equalClusterStmt(const ClusterStmt *a, const ClusterStmt *b)
|
||||
{
|
||||
COMPARE_NODE_FIELD(relation);
|
||||
COMPARE_STRING_FIELD(indexname);
|
||||
COMPARE_SCALAR_FIELD(options);
|
||||
COMPARE_NODE_FIELD(params);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -2130,7 +2130,7 @@ _equalReindexStmt(const ReindexStmt *a, const ReindexStmt *b)
|
||||
COMPARE_SCALAR_FIELD(kind);
|
||||
COMPARE_NODE_FIELD(relation);
|
||||
COMPARE_STRING_FIELD(name);
|
||||
COMPARE_SCALAR_FIELD(options);
|
||||
COMPARE_NODE_FIELD(params);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user