@@ -282,6 +282,7 @@ static Node *makeRecursiveViewSelect(char *relname, List *aliases, Node *query);
282282CreateMatViewStmt RefreshMatViewStmt CreateAmStmt
283283CreatePublicationStmt AlterPublicationStmt
284284CreateSubscriptionStmt AlterSubscriptionStmt DropSubscriptionStmt
285+ AlterTypeStmt
285286
286287%type <node> select_no_parens select_with_parens select_clause
287288simple_select values_clause
@@ -290,8 +291,8 @@ static Node *makeRecursiveViewSelect(char *relname, List *aliases, Node *query);
290291%type <ival> add_drop opt_asc_desc opt_nulls_order
291292
292293%type <node> alter_table_cmd alter_type_cmd opt_collate_clause
293- replica_identity partition_cmd
294- %type <list> alter_table_cmds alter_type_cmds
294+ replica_identity partition_cmd alterTypeCmd
295+ %type <list> alter_table_cmds alter_type_cmds alterTypeCmds
295296%type <list> alter_identity_column_option_list
296297%type <defelt> alter_identity_column_option
297298
@@ -846,6 +847,7 @@ stmt :
846847| AlterSubscriptionStmt
847848| AlterTSConfigurationStmt
848849| AlterTSDictionaryStmt
850+ | AlterTypeStmt
849851| AlterUserMappingStmt
850852| AlterUserSetStmt
851853| AlterUserStmt
@@ -2740,6 +2742,25 @@ PartitionRangeDatum:
27402742 * really variants of the ALTER TABLE subcommands with different spellings
27412743 *****************************************************************************/
27422744
2745+ AlterTypeStmt :
2746+ ALTER TYPE_P any_name alterTypeCmds
2747+ {
2748+ AlterTypeStmt *n = makeNode(AlterTypeStmt);
2749+ n->typeName =$3 ;
2750+ n->cmds =$4 ;
2751+ $$ = (Node *) n;
2752+ }
2753+ ;
2754+
2755+ alterTypeCmds :
2756+ alterTypeCmd {$$ = list_make1($1 ); }
2757+ | alterTypeCmds ' ,' alterTypeCmd {$$ = lappend($1 ,$3 ); }
2758+ ;
2759+
2760+ alterTypeCmd :
2761+ /* EMPTY*/
2762+ ;
2763+
27432764AlterCompositeTypeStmt :
27442765ALTER TYPE_P any_name alter_type_cmds
27452766{