@@ -576,8 +576,6 @@ static Node *makeRecursiveViewSelect(char *relname, List *aliases, Node *query);
576576%type <str> part_strategy
577577%type <partelem> part_elem
578578%type <list> part_params
579- %type <list> OptPartitionElementList PartitionElementList
580- %type <node> PartitionElement
581579%type <node> ForValues
582580%type <node> partbound_datum
583581%type <list> partbound_datum_list
@@ -3131,7 +3129,7 @@ CreateStmt: CREATE OptTemp TABLE qualified_name '(' OptTableElementList ')'
31313129 $$ = (Node *)n;
31323130 }
31333131 | CREATE OptTemp TABLE qualified_name PARTITION OF qualified_name
3134- OptPartitionElementList ForValues OptPartitionSpec OptWith
3132+ OptTypedTableElementList ForValues OptPartitionSpec OptWith
31353133 OnCommitOption OptTableSpace
31363134 {
31373135 CreateStmt *n = makeNode(CreateStmt);
@@ -3150,7 +3148,7 @@ CreateStmt: CREATE OptTemp TABLE qualified_name '(' OptTableElementList ')'
31503148 $$ = (Node *)n;
31513149 }
31523150 | CREATE OptTemp TABLE IF_P NOT EXISTS qualified_name PARTITION OF
3153- qualified_name OptPartitionElementList ForValues OptPartitionSpec
3151+ qualified_name OptTypedTableElementList ForValues OptPartitionSpec
31543152 OptWith OnCommitOption OptTableSpace
31553153 {
31563154 CreateStmt *n = makeNode(CreateStmt);
@@ -3213,11 +3211,6 @@ OptTypedTableElementList:
32133211 | /* EMPTY*/ { $$ = NIL; }
32143212 ;
32153213
3216- OptPartitionElementList :
3217- ' (' PartitionElementList ' )' { $$ = $2 ; }
3218- | /* EMPTY*/ { $$ = NIL; }
3219- ;
3220-
32213214TableElementList :
32223215 TableElement
32233216 {
@@ -3240,17 +3233,6 @@ TypedTableElementList:
32403233 }
32413234 ;
32423235
3243- PartitionElementList :
3244- PartitionElement
3245- {
3246- $$ = list_make1($1 );
3247- }
3248- | PartitionElementList ' ,' PartitionElement
3249- {
3250- $$ = lappend($1 , $3 );
3251- }
3252- ;
3253-
32543236TableElement :
32553237 columnDef { $$ = $1 ; }
32563238 | TableLikeClause { $$ = $1 ; }
@@ -3262,28 +3244,6 @@ TypedTableElement:
32623244 | TableConstraint { $$ = $1 ; }
32633245 ;
32643246
3265- PartitionElement :
3266- TableConstraint { $$ = $1 ; }
3267- | ColId ColQualList
3268- {
3269- ColumnDef *n = makeNode(ColumnDef);
3270- n->colname = $1 ;
3271- n->typeName = NULL ;
3272- n->inhcount = 0 ;
3273- n->is_local = true ;
3274- n->is_not_null = false ;
3275- n->is_from_type = false ;
3276- n->storage = 0 ;
3277- n->raw_default = NULL ;
3278- n->cooked_default = NULL ;
3279- n->collOid = InvalidOid;
3280- SplitColQualList ($2 , &n->constraints, &n->collClause,
3281- yyscanner);
3282- n->location = @1 ;
3283- $$ = (Node *) n;
3284- }
3285- ;
3286-
32873247columnDef : ColId Typename create_generic_options ColQualList
32883248 {
32893249 ColumnDef *n = makeNode(ColumnDef);
@@ -3305,7 +3265,25 @@ columnDef: ColId Typename create_generic_options ColQualList
33053265 }
33063266 ;
33073267
3308- columnOptions : ColId WITH OPTIONS ColQualList
3268+ columnOptions : ColId ColQualList
3269+ {
3270+ ColumnDef *n = makeNode(ColumnDef);
3271+ n->colname = $1 ;
3272+ n->typeName = NULL ;
3273+ n->inhcount = 0 ;
3274+ n->is_local = true ;
3275+ n->is_not_null = false ;
3276+ n->is_from_type = false ;
3277+ n->storage = 0 ;
3278+ n->raw_default = NULL ;
3279+ n->cooked_default = NULL ;
3280+ n->collOid = InvalidOid;
3281+ SplitColQualList ($2 , &n->constraints, &n->collClause,
3282+ yyscanner);
3283+ n->location = @1 ;
3284+ $$ = (Node *)n;
3285+ }
3286+ | ColId WITH OPTIONS ColQualList
33093287 {
33103288 ColumnDef *n = makeNode(ColumnDef);
33113289 n->colname = $1 ;
@@ -4872,7 +4850,7 @@ CreateForeignTableStmt:
48724850 $$ = (Node *) n;
48734851 }
48744852 | CREATE FOREIGN TABLE qualified_name
4875- PARTITION OF qualified_name OptPartitionElementList ForValues
4853+ PARTITION OF qualified_name OptTypedTableElementList ForValues
48764854 SERVER name create_generic_options
48774855 {
48784856 CreateForeignTableStmt *n = makeNode(CreateForeignTableStmt);
@@ -4893,7 +4871,7 @@ CreateForeignTableStmt:
48934871 $$ = (Node *) n;
48944872 }
48954873 | CREATE FOREIGN TABLE IF_P NOT EXISTS qualified_name
4896- PARTITION OF qualified_name OptPartitionElementList ForValues
4874+ PARTITION OF qualified_name OptTypedTableElementList ForValues
48974875 SERVER name create_generic_options
48984876 {
48994877 CreateForeignTableStmt *n = makeNode(CreateForeignTableStmt);
0 commit comments