@@ -587,9 +587,8 @@ static Node *makeRecursiveViewSelect(char *relname, List *aliases, Node *query);
587
587
%type <ival> dictionary_map_set_expr_operator
588
588
%type <dmapelem> dictionary_map_dict dictionary_map_command_expr_paren
589
589
dictionary_map_set_expr dictionary_map_case
590
- dictionary_map_action dictionary_map
591
- opt_dictionary_map_case_else dictionary_config
592
- dictionary_config_comma
590
+ dictionary_map_action opt_dictionary_map_case_else
591
+ dictionary_config dictionary_config_comma
593
592
594
593
/*
595
594
* Non-keyword token types. These are hard-wired into the "flex" lexer.
@@ -10449,7 +10448,7 @@ dictionary_config_comma:
10449
10448
;
10450
10449
10451
10450
dictionary_config :
10452
- dictionary_map {$$ =$1 ; }
10451
+ dictionary_map_set_expr {$$ =$1 ; }
10453
10452
| dictionary_map_dict ' ,' dictionary_config_comma
10454
10453
{
10455
10454
DictMapExprElem *n = makeNode(DictMapExprElem);
@@ -10465,11 +10464,6 @@ dictionary_config:
10465
10464
}
10466
10465
;
10467
10466
10468
- dictionary_map :
10469
- dictionary_map_case {$$ =$1 ; }
10470
- | dictionary_map_set_expr {$$ =$1 ; }
10471
- ;
10472
-
10473
10467
dictionary_map_action :
10474
10468
KEEP
10475
10469
{
@@ -10478,16 +10472,16 @@ dictionary_map_action:
10478
10472
n->data =NULL ;
10479
10473
$$ = n;
10480
10474
}
10481
- | dictionary_map {$$ =$1 ; }
10475
+ | dictionary_map_set_expr {$$ =$1 ; }
10482
10476
;
10483
10477
10484
10478
opt_dictionary_map_case_else :
10485
- ELSE dictionary_map {$$ =$2 ; }
10479
+ ELSE dictionary_map_set_expr {$$ =$2 ; }
10486
10480
| {$$ =NULL ; }
10487
10481
;
10488
10482
10489
10483
dictionary_map_case :
10490
- CASE dictionary_map WHEN opt_dictionary_map_no MATCH THEN dictionary_map_action opt_dictionary_map_case_else END_P
10484
+ CASE dictionary_map_set_expr WHEN opt_dictionary_map_no MATCH THEN dictionary_map_action opt_dictionary_map_case_else END_P
10491
10485
{
10492
10486
DictMapCase *n = makeNode(DictMapCase);
10493
10487
DictMapElem *r = makeNode(DictMapElem);
@@ -10512,20 +10506,7 @@ dictionary_map_set_expr_operator:
10512
10506
10513
10507
dictionary_map_set_expr :
10514
10508
dictionary_map_command_expr_paren {$$ =$1 ; }
10515
- | dictionary_map_case dictionary_map_set_expr_operator dictionary_map_case
10516
- {
10517
- DictMapExprElem *n = makeNode(DictMapExprElem);
10518
- DictMapElem *r = makeNode(DictMapElem);
10519
-
10520
- n->left =$1 ;
10521
- n->oper =$2 ;
10522
- n->right =$3 ;
10523
-
10524
- r->kind = DICT_MAP_EXPRESSION;
10525
- r->data = n;
10526
- $$ = r;
10527
- }
10528
- | dictionary_map_command_expr_paren dictionary_map_set_expr_operator dictionary_map_command_expr_paren
10509
+ | dictionary_map_set_expr dictionary_map_set_expr_operator dictionary_map_command_expr_paren
10529
10510
{
10530
10511
DictMapExprElem *n = makeNode(DictMapExprElem);
10531
10512
DictMapElem *r = makeNode(DictMapElem);
@@ -10543,6 +10524,7 @@ dictionary_map_set_expr:
10543
10524
dictionary_map_command_expr_paren :
10544
10525
' (' dictionary_map_set_expr ' )' {$$ =$2 ; }
10545
10526
| dictionary_map_dict {$$ =$1 ; }
10527
+ | dictionary_map_case {$$ =$1 ; }
10546
10528
;
10547
10529
10548
10530
dictionary_map_dict :