Skip to content

Commit edfeb57

Browse files
authored
Rename incremental nonterminal to opt_incremental. (#1473)
for src/backend/parser/gram.y, it is more convenient to name non-terminals (rules) using opt prefix if they allow empty input. There is no behavioral change. Found by review of cbdb - postgres16 rebase
1 parent 5bb33f7 commit edfeb57

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/backend/parser/gram.y

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ static void check_expressions_in_partition_key(PartitionSpec *spec, core_yyscan_
500500

501501
%type <range> OptTempTableName
502502
%type <into> into_clause create_as_target create_mv_target
503-
%type <boolean> incremental
503+
%type <boolean> opt_incremental
504504

505505
%type <defelt> createfunc_opt_item common_func_opt_item dostmt_opt_item
506506
%type <fun_param> func_arg func_arg_with_default table_func_column aggr_arg
@@ -7216,7 +7216,7 @@ ext_opt_encoding_item:
72167216
*****************************************************************************/
72177217

72187218
CreateMatViewStmt:
7219-
CREATE OptNoLog incremental MATERIALIZED VIEW create_mv_target AS SelectStmt opt_with_data OptDistributedBy
7219+
CREATE OptNoLog opt_incremental MATERIALIZED VIEW create_mv_target AS SelectStmt opt_with_data OptDistributedBy
72207220
{
72217221
CreateTableAsStmt *ctas = makeNode(CreateTableAsStmt);
72227222
ctas->query = $8;
@@ -7231,7 +7231,7 @@ CreateMatViewStmt:
72317231
ctas->into->distributedBy = $10;
72327232
$$ = (Node *) ctas;
72337233
}
7234-
| CREATE OptNoLog incremental MATERIALIZED VIEW IF_P NOT EXISTS create_mv_target AS SelectStmt opt_with_data OptDistributedBy
7234+
| CREATE OptNoLog opt_incremental MATERIALIZED VIEW IF_P NOT EXISTS create_mv_target AS SelectStmt opt_with_data OptDistributedBy
72357235
{
72367236
CreateTableAsStmt *ctas = makeNode(CreateTableAsStmt);
72377237
ctas->query = $11;
@@ -7336,7 +7336,7 @@ create_mv_target:
73367336
}
73377337
;
73387338

7339-
incremental: INCREMENTAL { $$ = true; }
7339+
opt_incremental: INCREMENTAL { $$ = true; }
73407340
| /*EMPTY*/ { $$ = false; }
73417341
;
73427342

0 commit comments

Comments
 (0)