From 71669925fec14690accc4e0bbb078da90fa36db8 Mon Sep 17 00:00:00 2001 From: msepga Date: Thu, 14 Dec 2023 19:43:52 -0500 Subject: [PATCH] Generate protobuf and funcs --- protobuf/pg_query.proto | 3880 +++++++++++++++++--------------- src/pg_query_enum_defs.c | 460 ++-- src/pg_query_outfuncs_conds.c | 728 +++--- src/pg_query_outfuncs_defs.c | 2455 ++++++++++---------- src/pg_query_readfuncs_conds.c | 260 ++- src/pg_query_readfuncs_defs.c | 3153 ++++++++++++++------------ srcdata/struct_defs.json | 664 ++++-- 7 files changed, 6308 insertions(+), 5292 deletions(-) diff --git a/protobuf/pg_query.proto b/protobuf/pg_query.proto index f4dabe18..0e2c2050 100644 --- a/protobuf/pg_query.proto +++ b/protobuf/pg_query.proto @@ -19,241 +19,255 @@ message Node { Alias alias = 1 [json_name="Alias"]; RangeVar range_var = 2 [json_name="RangeVar"]; TableFunc table_func = 3 [json_name="TableFunc"]; - Var var = 4 [json_name="Var"]; - Param param = 5 [json_name="Param"]; - Aggref aggref = 6 [json_name="Aggref"]; - GroupingFunc grouping_func = 7 [json_name="GroupingFunc"]; - WindowFunc window_func = 8 [json_name="WindowFunc"]; - SubscriptingRef subscripting_ref = 9 [json_name="SubscriptingRef"]; - FuncExpr func_expr = 10 [json_name="FuncExpr"]; - NamedArgExpr named_arg_expr = 11 [json_name="NamedArgExpr"]; - OpExpr op_expr = 12 [json_name="OpExpr"]; - DistinctExpr distinct_expr = 13 [json_name="DistinctExpr"]; - NullIfExpr null_if_expr = 14 [json_name="NullIfExpr"]; - ScalarArrayOpExpr scalar_array_op_expr = 15 [json_name="ScalarArrayOpExpr"]; - BoolExpr bool_expr = 16 [json_name="BoolExpr"]; - SubLink sub_link = 17 [json_name="SubLink"]; - SubPlan sub_plan = 18 [json_name="SubPlan"]; - AlternativeSubPlan alternative_sub_plan = 19 [json_name="AlternativeSubPlan"]; - FieldSelect field_select = 20 [json_name="FieldSelect"]; - FieldStore field_store = 21 [json_name="FieldStore"]; - RelabelType relabel_type = 22 [json_name="RelabelType"]; - CoerceViaIO coerce_via_io = 23 [json_name="CoerceViaIO"]; - ArrayCoerceExpr array_coerce_expr = 24 [json_name="ArrayCoerceExpr"]; - ConvertRowtypeExpr convert_rowtype_expr = 25 [json_name="ConvertRowtypeExpr"]; - CollateExpr collate_expr = 26 [json_name="CollateExpr"]; - CaseExpr case_expr = 27 [json_name="CaseExpr"]; - CaseWhen case_when = 28 [json_name="CaseWhen"]; - CaseTestExpr case_test_expr = 29 [json_name="CaseTestExpr"]; - ArrayExpr array_expr = 30 [json_name="ArrayExpr"]; - RowExpr row_expr = 31 [json_name="RowExpr"]; - RowCompareExpr row_compare_expr = 32 [json_name="RowCompareExpr"]; - CoalesceExpr coalesce_expr = 33 [json_name="CoalesceExpr"]; - MinMaxExpr min_max_expr = 34 [json_name="MinMaxExpr"]; - SQLValueFunction sqlvalue_function = 35 [json_name="SQLValueFunction"]; - XmlExpr xml_expr = 36 [json_name="XmlExpr"]; - NullTest null_test = 37 [json_name="NullTest"]; - BooleanTest boolean_test = 38 [json_name="BooleanTest"]; - CoerceToDomain coerce_to_domain = 39 [json_name="CoerceToDomain"]; - CoerceToDomainValue coerce_to_domain_value = 40 [json_name="CoerceToDomainValue"]; - SetToDefault set_to_default = 41 [json_name="SetToDefault"]; - CurrentOfExpr current_of_expr = 42 [json_name="CurrentOfExpr"]; - NextValueExpr next_value_expr = 43 [json_name="NextValueExpr"]; - InferenceElem inference_elem = 44 [json_name="InferenceElem"]; - TargetEntry target_entry = 45 [json_name="TargetEntry"]; - RangeTblRef range_tbl_ref = 46 [json_name="RangeTblRef"]; - JoinExpr join_expr = 47 [json_name="JoinExpr"]; - FromExpr from_expr = 48 [json_name="FromExpr"]; - OnConflictExpr on_conflict_expr = 49 [json_name="OnConflictExpr"]; - IntoClause into_clause = 50 [json_name="IntoClause"]; - MergeAction merge_action = 51 [json_name="MergeAction"]; - RawStmt raw_stmt = 52 [json_name="RawStmt"]; - Query query = 53 [json_name="Query"]; - InsertStmt insert_stmt = 54 [json_name="InsertStmt"]; - DeleteStmt delete_stmt = 55 [json_name="DeleteStmt"]; - UpdateStmt update_stmt = 56 [json_name="UpdateStmt"]; - MergeStmt merge_stmt = 57 [json_name="MergeStmt"]; - SelectStmt select_stmt = 58 [json_name="SelectStmt"]; - ReturnStmt return_stmt = 59 [json_name="ReturnStmt"]; - PLAssignStmt plassign_stmt = 60 [json_name="PLAssignStmt"]; - AlterTableStmt alter_table_stmt = 61 [json_name="AlterTableStmt"]; - AlterTableCmd alter_table_cmd = 62 [json_name="AlterTableCmd"]; - AlterDomainStmt alter_domain_stmt = 63 [json_name="AlterDomainStmt"]; - SetOperationStmt set_operation_stmt = 64 [json_name="SetOperationStmt"]; - GrantStmt grant_stmt = 65 [json_name="GrantStmt"]; - GrantRoleStmt grant_role_stmt = 66 [json_name="GrantRoleStmt"]; - AlterDefaultPrivilegesStmt alter_default_privileges_stmt = 67 [json_name="AlterDefaultPrivilegesStmt"]; - ClosePortalStmt close_portal_stmt = 68 [json_name="ClosePortalStmt"]; - ClusterStmt cluster_stmt = 69 [json_name="ClusterStmt"]; - CopyStmt copy_stmt = 70 [json_name="CopyStmt"]; - CreateStmt create_stmt = 71 [json_name="CreateStmt"]; - DefineStmt define_stmt = 72 [json_name="DefineStmt"]; - DropStmt drop_stmt = 73 [json_name="DropStmt"]; - TruncateStmt truncate_stmt = 74 [json_name="TruncateStmt"]; - CommentStmt comment_stmt = 75 [json_name="CommentStmt"]; - FetchStmt fetch_stmt = 76 [json_name="FetchStmt"]; - IndexStmt index_stmt = 77 [json_name="IndexStmt"]; - CreateFunctionStmt create_function_stmt = 78 [json_name="CreateFunctionStmt"]; - AlterFunctionStmt alter_function_stmt = 79 [json_name="AlterFunctionStmt"]; - DoStmt do_stmt = 80 [json_name="DoStmt"]; - RenameStmt rename_stmt = 81 [json_name="RenameStmt"]; - RuleStmt rule_stmt = 82 [json_name="RuleStmt"]; - NotifyStmt notify_stmt = 83 [json_name="NotifyStmt"]; - ListenStmt listen_stmt = 84 [json_name="ListenStmt"]; - UnlistenStmt unlisten_stmt = 85 [json_name="UnlistenStmt"]; - TransactionStmt transaction_stmt = 86 [json_name="TransactionStmt"]; - ViewStmt view_stmt = 87 [json_name="ViewStmt"]; - LoadStmt load_stmt = 88 [json_name="LoadStmt"]; - CreateDomainStmt create_domain_stmt = 89 [json_name="CreateDomainStmt"]; - CreatedbStmt createdb_stmt = 90 [json_name="CreatedbStmt"]; - DropdbStmt dropdb_stmt = 91 [json_name="DropdbStmt"]; - VacuumStmt vacuum_stmt = 92 [json_name="VacuumStmt"]; - ExplainStmt explain_stmt = 93 [json_name="ExplainStmt"]; - CreateTableAsStmt create_table_as_stmt = 94 [json_name="CreateTableAsStmt"]; - CreateSeqStmt create_seq_stmt = 95 [json_name="CreateSeqStmt"]; - AlterSeqStmt alter_seq_stmt = 96 [json_name="AlterSeqStmt"]; - VariableSetStmt variable_set_stmt = 97 [json_name="VariableSetStmt"]; - VariableShowStmt variable_show_stmt = 98 [json_name="VariableShowStmt"]; - DiscardStmt discard_stmt = 99 [json_name="DiscardStmt"]; - CreateTrigStmt create_trig_stmt = 100 [json_name="CreateTrigStmt"]; - CreatePLangStmt create_plang_stmt = 101 [json_name="CreatePLangStmt"]; - CreateRoleStmt create_role_stmt = 102 [json_name="CreateRoleStmt"]; - AlterRoleStmt alter_role_stmt = 103 [json_name="AlterRoleStmt"]; - DropRoleStmt drop_role_stmt = 104 [json_name="DropRoleStmt"]; - LockStmt lock_stmt = 105 [json_name="LockStmt"]; - ConstraintsSetStmt constraints_set_stmt = 106 [json_name="ConstraintsSetStmt"]; - ReindexStmt reindex_stmt = 107 [json_name="ReindexStmt"]; - CheckPointStmt check_point_stmt = 108 [json_name="CheckPointStmt"]; - CreateSchemaStmt create_schema_stmt = 109 [json_name="CreateSchemaStmt"]; - AlterDatabaseStmt alter_database_stmt = 110 [json_name="AlterDatabaseStmt"]; - AlterDatabaseRefreshCollStmt alter_database_refresh_coll_stmt = 111 [json_name="AlterDatabaseRefreshCollStmt"]; - AlterDatabaseSetStmt alter_database_set_stmt = 112 [json_name="AlterDatabaseSetStmt"]; - AlterRoleSetStmt alter_role_set_stmt = 113 [json_name="AlterRoleSetStmt"]; - CreateConversionStmt create_conversion_stmt = 114 [json_name="CreateConversionStmt"]; - CreateCastStmt create_cast_stmt = 115 [json_name="CreateCastStmt"]; - CreateOpClassStmt create_op_class_stmt = 116 [json_name="CreateOpClassStmt"]; - CreateOpFamilyStmt create_op_family_stmt = 117 [json_name="CreateOpFamilyStmt"]; - AlterOpFamilyStmt alter_op_family_stmt = 118 [json_name="AlterOpFamilyStmt"]; - PrepareStmt prepare_stmt = 119 [json_name="PrepareStmt"]; - ExecuteStmt execute_stmt = 120 [json_name="ExecuteStmt"]; - DeallocateStmt deallocate_stmt = 121 [json_name="DeallocateStmt"]; - DeclareCursorStmt declare_cursor_stmt = 122 [json_name="DeclareCursorStmt"]; - CreateTableSpaceStmt create_table_space_stmt = 123 [json_name="CreateTableSpaceStmt"]; - DropTableSpaceStmt drop_table_space_stmt = 124 [json_name="DropTableSpaceStmt"]; - AlterObjectDependsStmt alter_object_depends_stmt = 125 [json_name="AlterObjectDependsStmt"]; - AlterObjectSchemaStmt alter_object_schema_stmt = 126 [json_name="AlterObjectSchemaStmt"]; - AlterOwnerStmt alter_owner_stmt = 127 [json_name="AlterOwnerStmt"]; - AlterOperatorStmt alter_operator_stmt = 128 [json_name="AlterOperatorStmt"]; - AlterTypeStmt alter_type_stmt = 129 [json_name="AlterTypeStmt"]; - DropOwnedStmt drop_owned_stmt = 130 [json_name="DropOwnedStmt"]; - ReassignOwnedStmt reassign_owned_stmt = 131 [json_name="ReassignOwnedStmt"]; - CompositeTypeStmt composite_type_stmt = 132 [json_name="CompositeTypeStmt"]; - CreateEnumStmt create_enum_stmt = 133 [json_name="CreateEnumStmt"]; - CreateRangeStmt create_range_stmt = 134 [json_name="CreateRangeStmt"]; - AlterEnumStmt alter_enum_stmt = 135 [json_name="AlterEnumStmt"]; - AlterTSDictionaryStmt alter_tsdictionary_stmt = 136 [json_name="AlterTSDictionaryStmt"]; - AlterTSConfigurationStmt alter_tsconfiguration_stmt = 137 [json_name="AlterTSConfigurationStmt"]; - CreateFdwStmt create_fdw_stmt = 138 [json_name="CreateFdwStmt"]; - AlterFdwStmt alter_fdw_stmt = 139 [json_name="AlterFdwStmt"]; - CreateForeignServerStmt create_foreign_server_stmt = 140 [json_name="CreateForeignServerStmt"]; - AlterForeignServerStmt alter_foreign_server_stmt = 141 [json_name="AlterForeignServerStmt"]; - CreateUserMappingStmt create_user_mapping_stmt = 142 [json_name="CreateUserMappingStmt"]; - AlterUserMappingStmt alter_user_mapping_stmt = 143 [json_name="AlterUserMappingStmt"]; - DropUserMappingStmt drop_user_mapping_stmt = 144 [json_name="DropUserMappingStmt"]; - AlterTableSpaceOptionsStmt alter_table_space_options_stmt = 145 [json_name="AlterTableSpaceOptionsStmt"]; - AlterTableMoveAllStmt alter_table_move_all_stmt = 146 [json_name="AlterTableMoveAllStmt"]; - SecLabelStmt sec_label_stmt = 147 [json_name="SecLabelStmt"]; - CreateForeignTableStmt create_foreign_table_stmt = 148 [json_name="CreateForeignTableStmt"]; - ImportForeignSchemaStmt import_foreign_schema_stmt = 149 [json_name="ImportForeignSchemaStmt"]; - CreateExtensionStmt create_extension_stmt = 150 [json_name="CreateExtensionStmt"]; - AlterExtensionStmt alter_extension_stmt = 151 [json_name="AlterExtensionStmt"]; - AlterExtensionContentsStmt alter_extension_contents_stmt = 152 [json_name="AlterExtensionContentsStmt"]; - CreateEventTrigStmt create_event_trig_stmt = 153 [json_name="CreateEventTrigStmt"]; - AlterEventTrigStmt alter_event_trig_stmt = 154 [json_name="AlterEventTrigStmt"]; - RefreshMatViewStmt refresh_mat_view_stmt = 155 [json_name="RefreshMatViewStmt"]; - ReplicaIdentityStmt replica_identity_stmt = 156 [json_name="ReplicaIdentityStmt"]; - AlterSystemStmt alter_system_stmt = 157 [json_name="AlterSystemStmt"]; - CreatePolicyStmt create_policy_stmt = 158 [json_name="CreatePolicyStmt"]; - AlterPolicyStmt alter_policy_stmt = 159 [json_name="AlterPolicyStmt"]; - CreateTransformStmt create_transform_stmt = 160 [json_name="CreateTransformStmt"]; - CreateAmStmt create_am_stmt = 161 [json_name="CreateAmStmt"]; - CreatePublicationStmt create_publication_stmt = 162 [json_name="CreatePublicationStmt"]; - AlterPublicationStmt alter_publication_stmt = 163 [json_name="AlterPublicationStmt"]; - CreateSubscriptionStmt create_subscription_stmt = 164 [json_name="CreateSubscriptionStmt"]; - AlterSubscriptionStmt alter_subscription_stmt = 165 [json_name="AlterSubscriptionStmt"]; - DropSubscriptionStmt drop_subscription_stmt = 166 [json_name="DropSubscriptionStmt"]; - CreateStatsStmt create_stats_stmt = 167 [json_name="CreateStatsStmt"]; - AlterCollationStmt alter_collation_stmt = 168 [json_name="AlterCollationStmt"]; - CallStmt call_stmt = 169 [json_name="CallStmt"]; - AlterStatsStmt alter_stats_stmt = 170 [json_name="AlterStatsStmt"]; - A_Expr a_expr = 171 [json_name="A_Expr"]; - ColumnRef column_ref = 172 [json_name="ColumnRef"]; - ParamRef param_ref = 173 [json_name="ParamRef"]; - FuncCall func_call = 174 [json_name="FuncCall"]; - A_Star a_star = 175 [json_name="A_Star"]; - A_Indices a_indices = 176 [json_name="A_Indices"]; - A_Indirection a_indirection = 177 [json_name="A_Indirection"]; - A_ArrayExpr a_array_expr = 178 [json_name="A_ArrayExpr"]; - ResTarget res_target = 179 [json_name="ResTarget"]; - MultiAssignRef multi_assign_ref = 180 [json_name="MultiAssignRef"]; - TypeCast type_cast = 181 [json_name="TypeCast"]; - CollateClause collate_clause = 182 [json_name="CollateClause"]; - SortBy sort_by = 183 [json_name="SortBy"]; - WindowDef window_def = 184 [json_name="WindowDef"]; - RangeSubselect range_subselect = 185 [json_name="RangeSubselect"]; - RangeFunction range_function = 186 [json_name="RangeFunction"]; - RangeTableSample range_table_sample = 187 [json_name="RangeTableSample"]; - RangeTableFunc range_table_func = 188 [json_name="RangeTableFunc"]; - RangeTableFuncCol range_table_func_col = 189 [json_name="RangeTableFuncCol"]; - TypeName type_name = 190 [json_name="TypeName"]; - ColumnDef column_def = 191 [json_name="ColumnDef"]; - IndexElem index_elem = 192 [json_name="IndexElem"]; - StatsElem stats_elem = 193 [json_name="StatsElem"]; - Constraint constraint = 194 [json_name="Constraint"]; - DefElem def_elem = 195 [json_name="DefElem"]; - RangeTblEntry range_tbl_entry = 196 [json_name="RangeTblEntry"]; - RangeTblFunction range_tbl_function = 197 [json_name="RangeTblFunction"]; - TableSampleClause table_sample_clause = 198 [json_name="TableSampleClause"]; - WithCheckOption with_check_option = 199 [json_name="WithCheckOption"]; - SortGroupClause sort_group_clause = 200 [json_name="SortGroupClause"]; - GroupingSet grouping_set = 201 [json_name="GroupingSet"]; - WindowClause window_clause = 202 [json_name="WindowClause"]; - ObjectWithArgs object_with_args = 203 [json_name="ObjectWithArgs"]; - AccessPriv access_priv = 204 [json_name="AccessPriv"]; - CreateOpClassItem create_op_class_item = 205 [json_name="CreateOpClassItem"]; - TableLikeClause table_like_clause = 206 [json_name="TableLikeClause"]; - FunctionParameter function_parameter = 207 [json_name="FunctionParameter"]; - LockingClause locking_clause = 208 [json_name="LockingClause"]; - RowMarkClause row_mark_clause = 209 [json_name="RowMarkClause"]; - XmlSerialize xml_serialize = 210 [json_name="XmlSerialize"]; - WithClause with_clause = 211 [json_name="WithClause"]; - InferClause infer_clause = 212 [json_name="InferClause"]; - OnConflictClause on_conflict_clause = 213 [json_name="OnConflictClause"]; - CTESearchClause ctesearch_clause = 214 [json_name="CTESearchClause"]; - CTECycleClause ctecycle_clause = 215 [json_name="CTECycleClause"]; - CommonTableExpr common_table_expr = 216 [json_name="CommonTableExpr"]; - MergeWhenClause merge_when_clause = 217 [json_name="MergeWhenClause"]; - RoleSpec role_spec = 218 [json_name="RoleSpec"]; - TriggerTransition trigger_transition = 219 [json_name="TriggerTransition"]; - PartitionElem partition_elem = 220 [json_name="PartitionElem"]; - PartitionSpec partition_spec = 221 [json_name="PartitionSpec"]; - PartitionBoundSpec partition_bound_spec = 222 [json_name="PartitionBoundSpec"]; - PartitionRangeDatum partition_range_datum = 223 [json_name="PartitionRangeDatum"]; - PartitionCmd partition_cmd = 224 [json_name="PartitionCmd"]; - VacuumRelation vacuum_relation = 225 [json_name="VacuumRelation"]; - PublicationObjSpec publication_obj_spec = 226 [json_name="PublicationObjSpec"]; - PublicationTable publication_table = 227 [json_name="PublicationTable"]; - InlineCodeBlock inline_code_block = 228 [json_name="InlineCodeBlock"]; - CallContext call_context = 229 [json_name="CallContext"]; - Integer integer = 230 [json_name="Integer"]; - Float float = 231 [json_name="Float"]; - Boolean boolean = 232 [json_name="Boolean"]; - String string = 233 [json_name="String"]; - BitString bit_string = 234 [json_name="BitString"]; - List list = 235 [json_name="List"]; - IntList int_list = 236 [json_name="IntList"]; - OidList oid_list = 237 [json_name="OidList"]; - A_Const a_const = 238 [json_name="A_Const"]; + IntoClause into_clause = 4 [json_name="IntoClause"]; + Var var = 5 [json_name="Var"]; + Param param = 6 [json_name="Param"]; + Aggref aggref = 7 [json_name="Aggref"]; + GroupingFunc grouping_func = 8 [json_name="GroupingFunc"]; + WindowFunc window_func = 9 [json_name="WindowFunc"]; + SubscriptingRef subscripting_ref = 10 [json_name="SubscriptingRef"]; + FuncExpr func_expr = 11 [json_name="FuncExpr"]; + NamedArgExpr named_arg_expr = 12 [json_name="NamedArgExpr"]; + OpExpr op_expr = 13 [json_name="OpExpr"]; + DistinctExpr distinct_expr = 14 [json_name="DistinctExpr"]; + NullIfExpr null_if_expr = 15 [json_name="NullIfExpr"]; + ScalarArrayOpExpr scalar_array_op_expr = 16 [json_name="ScalarArrayOpExpr"]; + BoolExpr bool_expr = 17 [json_name="BoolExpr"]; + SubLink sub_link = 18 [json_name="SubLink"]; + SubPlan sub_plan = 19 [json_name="SubPlan"]; + AlternativeSubPlan alternative_sub_plan = 20 [json_name="AlternativeSubPlan"]; + FieldSelect field_select = 21 [json_name="FieldSelect"]; + FieldStore field_store = 22 [json_name="FieldStore"]; + RelabelType relabel_type = 23 [json_name="RelabelType"]; + CoerceViaIO coerce_via_io = 24 [json_name="CoerceViaIO"]; + ArrayCoerceExpr array_coerce_expr = 25 [json_name="ArrayCoerceExpr"]; + ConvertRowtypeExpr convert_rowtype_expr = 26 [json_name="ConvertRowtypeExpr"]; + CollateExpr collate_expr = 27 [json_name="CollateExpr"]; + CaseExpr case_expr = 28 [json_name="CaseExpr"]; + CaseWhen case_when = 29 [json_name="CaseWhen"]; + CaseTestExpr case_test_expr = 30 [json_name="CaseTestExpr"]; + ArrayExpr array_expr = 31 [json_name="ArrayExpr"]; + RowExpr row_expr = 32 [json_name="RowExpr"]; + RowCompareExpr row_compare_expr = 33 [json_name="RowCompareExpr"]; + CoalesceExpr coalesce_expr = 34 [json_name="CoalesceExpr"]; + MinMaxExpr min_max_expr = 35 [json_name="MinMaxExpr"]; + SQLValueFunction sqlvalue_function = 36 [json_name="SQLValueFunction"]; + XmlExpr xml_expr = 37 [json_name="XmlExpr"]; + JsonFormat json_format = 38 [json_name="JsonFormat"]; + JsonReturning json_returning = 39 [json_name="JsonReturning"]; + JsonValueExpr json_value_expr = 40 [json_name="JsonValueExpr"]; + JsonConstructorExpr json_constructor_expr = 41 [json_name="JsonConstructorExpr"]; + JsonIsPredicate json_is_predicate = 42 [json_name="JsonIsPredicate"]; + NullTest null_test = 43 [json_name="NullTest"]; + BooleanTest boolean_test = 44 [json_name="BooleanTest"]; + CoerceToDomain coerce_to_domain = 45 [json_name="CoerceToDomain"]; + CoerceToDomainValue coerce_to_domain_value = 46 [json_name="CoerceToDomainValue"]; + SetToDefault set_to_default = 47 [json_name="SetToDefault"]; + CurrentOfExpr current_of_expr = 48 [json_name="CurrentOfExpr"]; + NextValueExpr next_value_expr = 49 [json_name="NextValueExpr"]; + InferenceElem inference_elem = 50 [json_name="InferenceElem"]; + TargetEntry target_entry = 51 [json_name="TargetEntry"]; + RangeTblRef range_tbl_ref = 52 [json_name="RangeTblRef"]; + JoinExpr join_expr = 53 [json_name="JoinExpr"]; + FromExpr from_expr = 54 [json_name="FromExpr"]; + OnConflictExpr on_conflict_expr = 55 [json_name="OnConflictExpr"]; + Query query = 56 [json_name="Query"]; + TypeName type_name = 57 [json_name="TypeName"]; + ColumnRef column_ref = 58 [json_name="ColumnRef"]; + ParamRef param_ref = 59 [json_name="ParamRef"]; + A_Expr a_expr = 60 [json_name="A_Expr"]; + TypeCast type_cast = 61 [json_name="TypeCast"]; + CollateClause collate_clause = 62 [json_name="CollateClause"]; + RoleSpec role_spec = 63 [json_name="RoleSpec"]; + FuncCall func_call = 64 [json_name="FuncCall"]; + A_Star a_star = 65 [json_name="A_Star"]; + A_Indices a_indices = 66 [json_name="A_Indices"]; + A_Indirection a_indirection = 67 [json_name="A_Indirection"]; + A_ArrayExpr a_array_expr = 68 [json_name="A_ArrayExpr"]; + ResTarget res_target = 69 [json_name="ResTarget"]; + MultiAssignRef multi_assign_ref = 70 [json_name="MultiAssignRef"]; + SortBy sort_by = 71 [json_name="SortBy"]; + WindowDef window_def = 72 [json_name="WindowDef"]; + RangeSubselect range_subselect = 73 [json_name="RangeSubselect"]; + RangeFunction range_function = 74 [json_name="RangeFunction"]; + RangeTableFunc range_table_func = 75 [json_name="RangeTableFunc"]; + RangeTableFuncCol range_table_func_col = 76 [json_name="RangeTableFuncCol"]; + RangeTableSample range_table_sample = 77 [json_name="RangeTableSample"]; + ColumnDef column_def = 78 [json_name="ColumnDef"]; + TableLikeClause table_like_clause = 79 [json_name="TableLikeClause"]; + IndexElem index_elem = 80 [json_name="IndexElem"]; + DefElem def_elem = 81 [json_name="DefElem"]; + LockingClause locking_clause = 82 [json_name="LockingClause"]; + XmlSerialize xml_serialize = 83 [json_name="XmlSerialize"]; + PartitionElem partition_elem = 84 [json_name="PartitionElem"]; + PartitionSpec partition_spec = 85 [json_name="PartitionSpec"]; + PartitionBoundSpec partition_bound_spec = 86 [json_name="PartitionBoundSpec"]; + PartitionRangeDatum partition_range_datum = 87 [json_name="PartitionRangeDatum"]; + PartitionCmd partition_cmd = 88 [json_name="PartitionCmd"]; + RangeTblEntry range_tbl_entry = 89 [json_name="RangeTblEntry"]; + RTEPermissionInfo rtepermission_info = 90 [json_name="RTEPermissionInfo"]; + RangeTblFunction range_tbl_function = 91 [json_name="RangeTblFunction"]; + TableSampleClause table_sample_clause = 92 [json_name="TableSampleClause"]; + WithCheckOption with_check_option = 93 [json_name="WithCheckOption"]; + SortGroupClause sort_group_clause = 94 [json_name="SortGroupClause"]; + GroupingSet grouping_set = 95 [json_name="GroupingSet"]; + WindowClause window_clause = 96 [json_name="WindowClause"]; + RowMarkClause row_mark_clause = 97 [json_name="RowMarkClause"]; + WithClause with_clause = 98 [json_name="WithClause"]; + InferClause infer_clause = 99 [json_name="InferClause"]; + OnConflictClause on_conflict_clause = 100 [json_name="OnConflictClause"]; + CTESearchClause ctesearch_clause = 101 [json_name="CTESearchClause"]; + CTECycleClause ctecycle_clause = 102 [json_name="CTECycleClause"]; + CommonTableExpr common_table_expr = 103 [json_name="CommonTableExpr"]; + MergeWhenClause merge_when_clause = 104 [json_name="MergeWhenClause"]; + MergeAction merge_action = 105 [json_name="MergeAction"]; + TriggerTransition trigger_transition = 106 [json_name="TriggerTransition"]; + JsonOutput json_output = 107 [json_name="JsonOutput"]; + JsonKeyValue json_key_value = 108 [json_name="JsonKeyValue"]; + JsonObjectConstructor json_object_constructor = 109 [json_name="JsonObjectConstructor"]; + JsonArrayConstructor json_array_constructor = 110 [json_name="JsonArrayConstructor"]; + JsonArrayQueryConstructor json_array_query_constructor = 111 [json_name="JsonArrayQueryConstructor"]; + JsonAggConstructor json_agg_constructor = 112 [json_name="JsonAggConstructor"]; + JsonObjectAgg json_object_agg = 113 [json_name="JsonObjectAgg"]; + JsonArrayAgg json_array_agg = 114 [json_name="JsonArrayAgg"]; + RawStmt raw_stmt = 115 [json_name="RawStmt"]; + InsertStmt insert_stmt = 116 [json_name="InsertStmt"]; + DeleteStmt delete_stmt = 117 [json_name="DeleteStmt"]; + UpdateStmt update_stmt = 118 [json_name="UpdateStmt"]; + MergeStmt merge_stmt = 119 [json_name="MergeStmt"]; + SelectStmt select_stmt = 120 [json_name="SelectStmt"]; + SetOperationStmt set_operation_stmt = 121 [json_name="SetOperationStmt"]; + ReturnStmt return_stmt = 122 [json_name="ReturnStmt"]; + PLAssignStmt plassign_stmt = 123 [json_name="PLAssignStmt"]; + CreateSchemaStmt create_schema_stmt = 124 [json_name="CreateSchemaStmt"]; + AlterTableStmt alter_table_stmt = 125 [json_name="AlterTableStmt"]; + ReplicaIdentityStmt replica_identity_stmt = 126 [json_name="ReplicaIdentityStmt"]; + AlterTableCmd alter_table_cmd = 127 [json_name="AlterTableCmd"]; + AlterCollationStmt alter_collation_stmt = 128 [json_name="AlterCollationStmt"]; + AlterDomainStmt alter_domain_stmt = 129 [json_name="AlterDomainStmt"]; + GrantStmt grant_stmt = 130 [json_name="GrantStmt"]; + ObjectWithArgs object_with_args = 131 [json_name="ObjectWithArgs"]; + AccessPriv access_priv = 132 [json_name="AccessPriv"]; + GrantRoleStmt grant_role_stmt = 133 [json_name="GrantRoleStmt"]; + AlterDefaultPrivilegesStmt alter_default_privileges_stmt = 134 [json_name="AlterDefaultPrivilegesStmt"]; + CopyStmt copy_stmt = 135 [json_name="CopyStmt"]; + VariableSetStmt variable_set_stmt = 136 [json_name="VariableSetStmt"]; + VariableShowStmt variable_show_stmt = 137 [json_name="VariableShowStmt"]; + CreateStmt create_stmt = 138 [json_name="CreateStmt"]; + Constraint constraint = 139 [json_name="Constraint"]; + CreateTableSpaceStmt create_table_space_stmt = 140 [json_name="CreateTableSpaceStmt"]; + DropTableSpaceStmt drop_table_space_stmt = 141 [json_name="DropTableSpaceStmt"]; + AlterTableSpaceOptionsStmt alter_table_space_options_stmt = 142 [json_name="AlterTableSpaceOptionsStmt"]; + AlterTableMoveAllStmt alter_table_move_all_stmt = 143 [json_name="AlterTableMoveAllStmt"]; + CreateExtensionStmt create_extension_stmt = 144 [json_name="CreateExtensionStmt"]; + AlterExtensionStmt alter_extension_stmt = 145 [json_name="AlterExtensionStmt"]; + AlterExtensionContentsStmt alter_extension_contents_stmt = 146 [json_name="AlterExtensionContentsStmt"]; + CreateFdwStmt create_fdw_stmt = 147 [json_name="CreateFdwStmt"]; + AlterFdwStmt alter_fdw_stmt = 148 [json_name="AlterFdwStmt"]; + CreateForeignServerStmt create_foreign_server_stmt = 149 [json_name="CreateForeignServerStmt"]; + AlterForeignServerStmt alter_foreign_server_stmt = 150 [json_name="AlterForeignServerStmt"]; + CreateForeignTableStmt create_foreign_table_stmt = 151 [json_name="CreateForeignTableStmt"]; + CreateUserMappingStmt create_user_mapping_stmt = 152 [json_name="CreateUserMappingStmt"]; + AlterUserMappingStmt alter_user_mapping_stmt = 153 [json_name="AlterUserMappingStmt"]; + DropUserMappingStmt drop_user_mapping_stmt = 154 [json_name="DropUserMappingStmt"]; + ImportForeignSchemaStmt import_foreign_schema_stmt = 155 [json_name="ImportForeignSchemaStmt"]; + CreatePolicyStmt create_policy_stmt = 156 [json_name="CreatePolicyStmt"]; + AlterPolicyStmt alter_policy_stmt = 157 [json_name="AlterPolicyStmt"]; + CreateAmStmt create_am_stmt = 158 [json_name="CreateAmStmt"]; + CreateTrigStmt create_trig_stmt = 159 [json_name="CreateTrigStmt"]; + CreateEventTrigStmt create_event_trig_stmt = 160 [json_name="CreateEventTrigStmt"]; + AlterEventTrigStmt alter_event_trig_stmt = 161 [json_name="AlterEventTrigStmt"]; + CreatePLangStmt create_plang_stmt = 162 [json_name="CreatePLangStmt"]; + CreateRoleStmt create_role_stmt = 163 [json_name="CreateRoleStmt"]; + AlterRoleStmt alter_role_stmt = 164 [json_name="AlterRoleStmt"]; + AlterRoleSetStmt alter_role_set_stmt = 165 [json_name="AlterRoleSetStmt"]; + DropRoleStmt drop_role_stmt = 166 [json_name="DropRoleStmt"]; + CreateSeqStmt create_seq_stmt = 167 [json_name="CreateSeqStmt"]; + AlterSeqStmt alter_seq_stmt = 168 [json_name="AlterSeqStmt"]; + DefineStmt define_stmt = 169 [json_name="DefineStmt"]; + CreateDomainStmt create_domain_stmt = 170 [json_name="CreateDomainStmt"]; + CreateOpClassStmt create_op_class_stmt = 171 [json_name="CreateOpClassStmt"]; + CreateOpClassItem create_op_class_item = 172 [json_name="CreateOpClassItem"]; + CreateOpFamilyStmt create_op_family_stmt = 173 [json_name="CreateOpFamilyStmt"]; + AlterOpFamilyStmt alter_op_family_stmt = 174 [json_name="AlterOpFamilyStmt"]; + DropStmt drop_stmt = 175 [json_name="DropStmt"]; + TruncateStmt truncate_stmt = 176 [json_name="TruncateStmt"]; + CommentStmt comment_stmt = 177 [json_name="CommentStmt"]; + SecLabelStmt sec_label_stmt = 178 [json_name="SecLabelStmt"]; + DeclareCursorStmt declare_cursor_stmt = 179 [json_name="DeclareCursorStmt"]; + ClosePortalStmt close_portal_stmt = 180 [json_name="ClosePortalStmt"]; + FetchStmt fetch_stmt = 181 [json_name="FetchStmt"]; + IndexStmt index_stmt = 182 [json_name="IndexStmt"]; + CreateStatsStmt create_stats_stmt = 183 [json_name="CreateStatsStmt"]; + StatsElem stats_elem = 184 [json_name="StatsElem"]; + AlterStatsStmt alter_stats_stmt = 185 [json_name="AlterStatsStmt"]; + CreateFunctionStmt create_function_stmt = 186 [json_name="CreateFunctionStmt"]; + FunctionParameter function_parameter = 187 [json_name="FunctionParameter"]; + AlterFunctionStmt alter_function_stmt = 188 [json_name="AlterFunctionStmt"]; + DoStmt do_stmt = 189 [json_name="DoStmt"]; + InlineCodeBlock inline_code_block = 190 [json_name="InlineCodeBlock"]; + CallStmt call_stmt = 191 [json_name="CallStmt"]; + CallContext call_context = 192 [json_name="CallContext"]; + RenameStmt rename_stmt = 193 [json_name="RenameStmt"]; + AlterObjectDependsStmt alter_object_depends_stmt = 194 [json_name="AlterObjectDependsStmt"]; + AlterObjectSchemaStmt alter_object_schema_stmt = 195 [json_name="AlterObjectSchemaStmt"]; + AlterOwnerStmt alter_owner_stmt = 196 [json_name="AlterOwnerStmt"]; + AlterOperatorStmt alter_operator_stmt = 197 [json_name="AlterOperatorStmt"]; + AlterTypeStmt alter_type_stmt = 198 [json_name="AlterTypeStmt"]; + RuleStmt rule_stmt = 199 [json_name="RuleStmt"]; + NotifyStmt notify_stmt = 200 [json_name="NotifyStmt"]; + ListenStmt listen_stmt = 201 [json_name="ListenStmt"]; + UnlistenStmt unlisten_stmt = 202 [json_name="UnlistenStmt"]; + TransactionStmt transaction_stmt = 203 [json_name="TransactionStmt"]; + CompositeTypeStmt composite_type_stmt = 204 [json_name="CompositeTypeStmt"]; + CreateEnumStmt create_enum_stmt = 205 [json_name="CreateEnumStmt"]; + CreateRangeStmt create_range_stmt = 206 [json_name="CreateRangeStmt"]; + AlterEnumStmt alter_enum_stmt = 207 [json_name="AlterEnumStmt"]; + ViewStmt view_stmt = 208 [json_name="ViewStmt"]; + LoadStmt load_stmt = 209 [json_name="LoadStmt"]; + CreatedbStmt createdb_stmt = 210 [json_name="CreatedbStmt"]; + AlterDatabaseStmt alter_database_stmt = 211 [json_name="AlterDatabaseStmt"]; + AlterDatabaseRefreshCollStmt alter_database_refresh_coll_stmt = 212 [json_name="AlterDatabaseRefreshCollStmt"]; + AlterDatabaseSetStmt alter_database_set_stmt = 213 [json_name="AlterDatabaseSetStmt"]; + DropdbStmt dropdb_stmt = 214 [json_name="DropdbStmt"]; + AlterSystemStmt alter_system_stmt = 215 [json_name="AlterSystemStmt"]; + ClusterStmt cluster_stmt = 216 [json_name="ClusterStmt"]; + VacuumStmt vacuum_stmt = 217 [json_name="VacuumStmt"]; + VacuumRelation vacuum_relation = 218 [json_name="VacuumRelation"]; + ExplainStmt explain_stmt = 219 [json_name="ExplainStmt"]; + CreateTableAsStmt create_table_as_stmt = 220 [json_name="CreateTableAsStmt"]; + RefreshMatViewStmt refresh_mat_view_stmt = 221 [json_name="RefreshMatViewStmt"]; + CheckPointStmt check_point_stmt = 222 [json_name="CheckPointStmt"]; + DiscardStmt discard_stmt = 223 [json_name="DiscardStmt"]; + LockStmt lock_stmt = 224 [json_name="LockStmt"]; + ConstraintsSetStmt constraints_set_stmt = 225 [json_name="ConstraintsSetStmt"]; + ReindexStmt reindex_stmt = 226 [json_name="ReindexStmt"]; + CreateConversionStmt create_conversion_stmt = 227 [json_name="CreateConversionStmt"]; + CreateCastStmt create_cast_stmt = 228 [json_name="CreateCastStmt"]; + CreateTransformStmt create_transform_stmt = 229 [json_name="CreateTransformStmt"]; + PrepareStmt prepare_stmt = 230 [json_name="PrepareStmt"]; + ExecuteStmt execute_stmt = 231 [json_name="ExecuteStmt"]; + DeallocateStmt deallocate_stmt = 232 [json_name="DeallocateStmt"]; + DropOwnedStmt drop_owned_stmt = 233 [json_name="DropOwnedStmt"]; + ReassignOwnedStmt reassign_owned_stmt = 234 [json_name="ReassignOwnedStmt"]; + AlterTSDictionaryStmt alter_tsdictionary_stmt = 235 [json_name="AlterTSDictionaryStmt"]; + AlterTSConfigurationStmt alter_tsconfiguration_stmt = 236 [json_name="AlterTSConfigurationStmt"]; + PublicationTable publication_table = 237 [json_name="PublicationTable"]; + PublicationObjSpec publication_obj_spec = 238 [json_name="PublicationObjSpec"]; + CreatePublicationStmt create_publication_stmt = 239 [json_name="CreatePublicationStmt"]; + AlterPublicationStmt alter_publication_stmt = 240 [json_name="AlterPublicationStmt"]; + CreateSubscriptionStmt create_subscription_stmt = 241 [json_name="CreateSubscriptionStmt"]; + AlterSubscriptionStmt alter_subscription_stmt = 242 [json_name="AlterSubscriptionStmt"]; + DropSubscriptionStmt drop_subscription_stmt = 243 [json_name="DropSubscriptionStmt"]; + Integer integer = 244 [json_name="Integer"]; + Float float = 245 [json_name="Float"]; + Boolean boolean = 246 [json_name="Boolean"]; + String string = 247 [json_name="String"]; + BitString bit_string = 248 [json_name="BitString"]; + List list = 249 [json_name="List"]; + IntList int_list = 250 [json_name="IntList"]; + OidList oid_list = 251 [json_name="OidList"]; + A_Const a_const = 252 [json_name="A_Const"]; } } @@ -344,6 +358,18 @@ message TableFunc int32 location = 13 [json_name="location"]; } +message IntoClause +{ + RangeVar rel = 1 [json_name="rel"]; + repeated Node col_names = 2 [json_name="colNames"]; + string access_method = 3 [json_name="accessMethod"]; + repeated Node options = 4 [json_name="options"]; + OnCommitAction on_commit = 5 [json_name="onCommit"]; + string table_space_name = 6 [json_name="tableSpaceName"]; + Node view_query = 7 [json_name="viewQuery"]; + bool skip_data = 8 [json_name="skipData"]; +} + message Var { Node xpr = 1 [json_name="xpr"]; @@ -352,10 +378,9 @@ message Var uint32 vartype = 4 [json_name="vartype"]; int32 vartypmod = 5 [json_name="vartypmod"]; uint32 varcollid = 6 [json_name="varcollid"]; - uint32 varlevelsup = 7 [json_name="varlevelsup"]; - uint32 varnosyn = 8 [json_name="varnosyn"]; - int32 varattnosyn = 9 [json_name="varattnosyn"]; - int32 location = 10 [json_name="location"]; + repeated uint64 varnullingrels = 7 [json_name="varnullingrels"]; + uint32 varlevelsup = 8 [json_name="varlevelsup"]; + int32 location = 9 [json_name="location"]; } message Param @@ -376,21 +401,20 @@ message Aggref uint32 aggtype = 3 [json_name="aggtype"]; uint32 aggcollid = 4 [json_name="aggcollid"]; uint32 inputcollid = 5 [json_name="inputcollid"]; - uint32 aggtranstype = 6 [json_name="aggtranstype"]; - repeated Node aggargtypes = 7 [json_name="aggargtypes"]; - repeated Node aggdirectargs = 8 [json_name="aggdirectargs"]; - repeated Node args = 9 [json_name="args"]; - repeated Node aggorder = 10 [json_name="aggorder"]; - repeated Node aggdistinct = 11 [json_name="aggdistinct"]; - Node aggfilter = 12 [json_name="aggfilter"]; - bool aggstar = 13 [json_name="aggstar"]; - bool aggvariadic = 14 [json_name="aggvariadic"]; - string aggkind = 15 [json_name="aggkind"]; - uint32 agglevelsup = 16 [json_name="agglevelsup"]; - AggSplit aggsplit = 17 [json_name="aggsplit"]; - int32 aggno = 18 [json_name="aggno"]; - int32 aggtransno = 19 [json_name="aggtransno"]; - int32 location = 20 [json_name="location"]; + repeated Node aggargtypes = 6 [json_name="aggargtypes"]; + repeated Node aggdirectargs = 7 [json_name="aggdirectargs"]; + repeated Node args = 8 [json_name="args"]; + repeated Node aggorder = 9 [json_name="aggorder"]; + repeated Node aggdistinct = 10 [json_name="aggdistinct"]; + Node aggfilter = 11 [json_name="aggfilter"]; + bool aggstar = 12 [json_name="aggstar"]; + bool aggvariadic = 13 [json_name="aggvariadic"]; + string aggkind = 14 [json_name="aggkind"]; + uint32 agglevelsup = 15 [json_name="agglevelsup"]; + AggSplit aggsplit = 16 [json_name="aggsplit"]; + int32 aggno = 17 [json_name="aggno"]; + int32 aggtransno = 18 [json_name="aggtransno"]; + int32 location = 19 [json_name="location"]; } message GroupingFunc @@ -398,9 +422,8 @@ message GroupingFunc Node xpr = 1 [json_name="xpr"]; repeated Node args = 2 [json_name="args"]; repeated Node refs = 3 [json_name="refs"]; - repeated Node cols = 4 [json_name="cols"]; - uint32 agglevelsup = 5 [json_name="agglevelsup"]; - int32 location = 6 [json_name="location"]; + uint32 agglevelsup = 4 [json_name="agglevelsup"]; + int32 location = 5 [json_name="location"]; } message WindowFunc @@ -459,52 +482,46 @@ message OpExpr { Node xpr = 1 [json_name="xpr"]; uint32 opno = 2 [json_name="opno"]; - uint32 opfuncid = 3 [json_name="opfuncid"]; - uint32 opresulttype = 4 [json_name="opresulttype"]; - bool opretset = 5 [json_name="opretset"]; - uint32 opcollid = 6 [json_name="opcollid"]; - uint32 inputcollid = 7 [json_name="inputcollid"]; - repeated Node args = 8 [json_name="args"]; - int32 location = 9 [json_name="location"]; + uint32 opresulttype = 3 [json_name="opresulttype"]; + bool opretset = 4 [json_name="opretset"]; + uint32 opcollid = 5 [json_name="opcollid"]; + uint32 inputcollid = 6 [json_name="inputcollid"]; + repeated Node args = 7 [json_name="args"]; + int32 location = 8 [json_name="location"]; } message DistinctExpr { Node xpr = 1 [json_name="xpr"]; uint32 opno = 2 [json_name="opno"]; - uint32 opfuncid = 3 [json_name="opfuncid"]; - uint32 opresulttype = 4 [json_name="opresulttype"]; - bool opretset = 5 [json_name="opretset"]; - uint32 opcollid = 6 [json_name="opcollid"]; - uint32 inputcollid = 7 [json_name="inputcollid"]; - repeated Node args = 8 [json_name="args"]; - int32 location = 9 [json_name="location"]; + uint32 opresulttype = 3 [json_name="opresulttype"]; + bool opretset = 4 [json_name="opretset"]; + uint32 opcollid = 5 [json_name="opcollid"]; + uint32 inputcollid = 6 [json_name="inputcollid"]; + repeated Node args = 7 [json_name="args"]; + int32 location = 8 [json_name="location"]; } message NullIfExpr { Node xpr = 1 [json_name="xpr"]; uint32 opno = 2 [json_name="opno"]; - uint32 opfuncid = 3 [json_name="opfuncid"]; - uint32 opresulttype = 4 [json_name="opresulttype"]; - bool opretset = 5 [json_name="opretset"]; - uint32 opcollid = 6 [json_name="opcollid"]; - uint32 inputcollid = 7 [json_name="inputcollid"]; - repeated Node args = 8 [json_name="args"]; - int32 location = 9 [json_name="location"]; + uint32 opresulttype = 3 [json_name="opresulttype"]; + bool opretset = 4 [json_name="opretset"]; + uint32 opcollid = 5 [json_name="opcollid"]; + uint32 inputcollid = 6 [json_name="inputcollid"]; + repeated Node args = 7 [json_name="args"]; + int32 location = 8 [json_name="location"]; } message ScalarArrayOpExpr { Node xpr = 1 [json_name="xpr"]; uint32 opno = 2 [json_name="opno"]; - uint32 opfuncid = 3 [json_name="opfuncid"]; - uint32 hashfuncid = 4 [json_name="hashfuncid"]; - uint32 negfuncid = 5 [json_name="negfuncid"]; - bool use_or = 6 [json_name="useOr"]; - uint32 inputcollid = 7 [json_name="inputcollid"]; - repeated Node args = 8 [json_name="args"]; - int32 location = 9 [json_name="location"]; + bool use_or = 3 [json_name="useOr"]; + uint32 inputcollid = 4 [json_name="inputcollid"]; + repeated Node args = 5 [json_name="args"]; + int32 location = 6 [json_name="location"]; } message BoolExpr @@ -719,9 +736,53 @@ message XmlExpr repeated Node arg_names = 5 [json_name="arg_names"]; repeated Node args = 6 [json_name="args"]; XmlOptionType xmloption = 7 [json_name="xmloption"]; - uint32 type = 8 [json_name="type"]; - int32 typmod = 9 [json_name="typmod"]; - int32 location = 10 [json_name="location"]; + bool indent = 8 [json_name="indent"]; + uint32 type = 9 [json_name="type"]; + int32 typmod = 10 [json_name="typmod"]; + int32 location = 11 [json_name="location"]; +} + +message JsonFormat +{ + JsonFormatType format_type = 1 [json_name="format_type"]; + JsonEncoding encoding = 2 [json_name="encoding"]; + int32 location = 3 [json_name="location"]; +} + +message JsonReturning +{ + JsonFormat format = 1 [json_name="format"]; + uint32 typid = 2 [json_name="typid"]; + int32 typmod = 3 [json_name="typmod"]; +} + +message JsonValueExpr +{ + Node raw_expr = 1 [json_name="raw_expr"]; + Node formatted_expr = 2 [json_name="formatted_expr"]; + JsonFormat format = 3 [json_name="format"]; +} + +message JsonConstructorExpr +{ + Node xpr = 1 [json_name="xpr"]; + JsonConstructorType type = 2 [json_name="type"]; + repeated Node args = 3 [json_name="args"]; + Node func = 4 [json_name="func"]; + Node coercion = 5 [json_name="coercion"]; + JsonReturning returning = 6 [json_name="returning"]; + bool absent_on_null = 7 [json_name="absent_on_null"]; + bool unique = 8 [json_name="unique"]; + int32 location = 9 [json_name="location"]; +} + +message JsonIsPredicate +{ + Node expr = 1 [json_name="expr"]; + JsonFormat format = 2 [json_name="format"]; + JsonValueType item_type = 3 [json_name="item_type"]; + bool unique_keys = 4 [json_name="unique_keys"]; + int32 location = 5 [json_name="location"]; } message NullTest @@ -841,35 +902,6 @@ message OnConflictExpr repeated Node excl_rel_tlist = 8 [json_name="exclRelTlist"]; } -message IntoClause -{ - RangeVar rel = 1 [json_name="rel"]; - repeated Node col_names = 2 [json_name="colNames"]; - string access_method = 3 [json_name="accessMethod"]; - repeated Node options = 4 [json_name="options"]; - OnCommitAction on_commit = 5 [json_name="onCommit"]; - string table_space_name = 6 [json_name="tableSpaceName"]; - Node view_query = 7 [json_name="viewQuery"]; - bool skip_data = 8 [json_name="skipData"]; -} - -message MergeAction -{ - bool matched = 1 [json_name="matched"]; - CmdType command_type = 2 [json_name="commandType"]; - OverridingKind override = 3 [json_name="override"]; - Node qual = 4 [json_name="qual"]; - repeated Node target_list = 5 [json_name="targetList"]; - repeated Node update_colnos = 6 [json_name="updateColnos"]; -} - -message RawStmt -{ - Node stmt = 1 [json_name="stmt"]; - int32 stmt_location = 2 [json_name="stmt_location"]; - int32 stmt_len = 3 [json_name="stmt_len"]; -} - message Query { CmdType command_type = 1 [json_name="commandType"]; @@ -889,525 +921,680 @@ message Query bool is_return = 15 [json_name="isReturn"]; repeated Node cte_list = 16 [json_name="cteList"]; repeated Node rtable = 17 [json_name="rtable"]; - FromExpr jointree = 18 [json_name="jointree"]; - repeated Node merge_action_list = 19 [json_name="mergeActionList"]; - bool merge_use_outer_join = 20 [json_name="mergeUseOuterJoin"]; - repeated Node target_list = 21 [json_name="targetList"]; - OverridingKind override = 22 [json_name="override"]; - OnConflictExpr on_conflict = 23 [json_name="onConflict"]; - repeated Node returning_list = 24 [json_name="returningList"]; - repeated Node group_clause = 25 [json_name="groupClause"]; - bool group_distinct = 26 [json_name="groupDistinct"]; - repeated Node grouping_sets = 27 [json_name="groupingSets"]; - Node having_qual = 28 [json_name="havingQual"]; - repeated Node window_clause = 29 [json_name="windowClause"]; - repeated Node distinct_clause = 30 [json_name="distinctClause"]; - repeated Node sort_clause = 31 [json_name="sortClause"]; - Node limit_offset = 32 [json_name="limitOffset"]; - Node limit_count = 33 [json_name="limitCount"]; - LimitOption limit_option = 34 [json_name="limitOption"]; - repeated Node row_marks = 35 [json_name="rowMarks"]; - Node set_operations = 36 [json_name="setOperations"]; - repeated Node constraint_deps = 37 [json_name="constraintDeps"]; - repeated Node with_check_options = 38 [json_name="withCheckOptions"]; - int32 stmt_location = 39 [json_name="stmt_location"]; - int32 stmt_len = 40 [json_name="stmt_len"]; + repeated Node rteperminfos = 18 [json_name="rteperminfos"]; + FromExpr jointree = 19 [json_name="jointree"]; + repeated Node merge_action_list = 20 [json_name="mergeActionList"]; + bool merge_use_outer_join = 21 [json_name="mergeUseOuterJoin"]; + repeated Node target_list = 22 [json_name="targetList"]; + OverridingKind override = 23 [json_name="override"]; + OnConflictExpr on_conflict = 24 [json_name="onConflict"]; + repeated Node returning_list = 25 [json_name="returningList"]; + repeated Node group_clause = 26 [json_name="groupClause"]; + bool group_distinct = 27 [json_name="groupDistinct"]; + repeated Node grouping_sets = 28 [json_name="groupingSets"]; + Node having_qual = 29 [json_name="havingQual"]; + repeated Node window_clause = 30 [json_name="windowClause"]; + repeated Node distinct_clause = 31 [json_name="distinctClause"]; + repeated Node sort_clause = 32 [json_name="sortClause"]; + Node limit_offset = 33 [json_name="limitOffset"]; + Node limit_count = 34 [json_name="limitCount"]; + LimitOption limit_option = 35 [json_name="limitOption"]; + repeated Node row_marks = 36 [json_name="rowMarks"]; + Node set_operations = 37 [json_name="setOperations"]; + repeated Node constraint_deps = 38 [json_name="constraintDeps"]; + repeated Node with_check_options = 39 [json_name="withCheckOptions"]; + int32 stmt_location = 40 [json_name="stmt_location"]; + int32 stmt_len = 41 [json_name="stmt_len"]; } -message InsertStmt +message TypeName { - RangeVar relation = 1 [json_name="relation"]; - repeated Node cols = 2 [json_name="cols"]; - Node select_stmt = 3 [json_name="selectStmt"]; - OnConflictClause on_conflict_clause = 4 [json_name="onConflictClause"]; - repeated Node returning_list = 5 [json_name="returningList"]; - WithClause with_clause = 6 [json_name="withClause"]; - OverridingKind override = 7 [json_name="override"]; + repeated Node names = 1 [json_name="names"]; + uint32 type_oid = 2 [json_name="typeOid"]; + bool setof = 3 [json_name="setof"]; + bool pct_type = 4 [json_name="pct_type"]; + repeated Node typmods = 5 [json_name="typmods"]; + int32 typemod = 6 [json_name="typemod"]; + repeated Node array_bounds = 7 [json_name="arrayBounds"]; + int32 location = 8 [json_name="location"]; } -message DeleteStmt +message ColumnRef { - RangeVar relation = 1 [json_name="relation"]; - repeated Node using_clause = 2 [json_name="usingClause"]; - Node where_clause = 3 [json_name="whereClause"]; - repeated Node returning_list = 4 [json_name="returningList"]; - WithClause with_clause = 5 [json_name="withClause"]; + repeated Node fields = 1 [json_name="fields"]; + int32 location = 2 [json_name="location"]; } -message UpdateStmt +message ParamRef { - RangeVar relation = 1 [json_name="relation"]; - repeated Node target_list = 2 [json_name="targetList"]; - Node where_clause = 3 [json_name="whereClause"]; - repeated Node from_clause = 4 [json_name="fromClause"]; - repeated Node returning_list = 5 [json_name="returningList"]; - WithClause with_clause = 6 [json_name="withClause"]; + int32 number = 1 [json_name="number"]; + int32 location = 2 [json_name="location"]; } -message MergeStmt +message A_Expr { - RangeVar relation = 1 [json_name="relation"]; - Node source_relation = 2 [json_name="sourceRelation"]; - Node join_condition = 3 [json_name="joinCondition"]; - repeated Node merge_when_clauses = 4 [json_name="mergeWhenClauses"]; - WithClause with_clause = 5 [json_name="withClause"]; + A_Expr_Kind kind = 1 [json_name="kind"]; + repeated Node name = 2 [json_name="name"]; + Node lexpr = 3 [json_name="lexpr"]; + Node rexpr = 4 [json_name="rexpr"]; + int32 location = 5 [json_name="location"]; } -message SelectStmt +message TypeCast { - repeated Node distinct_clause = 1 [json_name="distinctClause"]; - IntoClause into_clause = 2 [json_name="intoClause"]; - repeated Node target_list = 3 [json_name="targetList"]; - repeated Node from_clause = 4 [json_name="fromClause"]; - Node where_clause = 5 [json_name="whereClause"]; - repeated Node group_clause = 6 [json_name="groupClause"]; - bool group_distinct = 7 [json_name="groupDistinct"]; - Node having_clause = 8 [json_name="havingClause"]; - repeated Node window_clause = 9 [json_name="windowClause"]; - repeated Node values_lists = 10 [json_name="valuesLists"]; - repeated Node sort_clause = 11 [json_name="sortClause"]; - Node limit_offset = 12 [json_name="limitOffset"]; - Node limit_count = 13 [json_name="limitCount"]; - LimitOption limit_option = 14 [json_name="limitOption"]; - repeated Node locking_clause = 15 [json_name="lockingClause"]; - WithClause with_clause = 16 [json_name="withClause"]; - SetOperation op = 17 [json_name="op"]; - bool all = 18 [json_name="all"]; - SelectStmt larg = 19 [json_name="larg"]; - SelectStmt rarg = 20 [json_name="rarg"]; + Node arg = 1 [json_name="arg"]; + TypeName type_name = 2 [json_name="typeName"]; + int32 location = 3 [json_name="location"]; } -message ReturnStmt +message CollateClause { - Node returnval = 1 [json_name="returnval"]; + Node arg = 1 [json_name="arg"]; + repeated Node collname = 2 [json_name="collname"]; + int32 location = 3 [json_name="location"]; } -message PLAssignStmt +message RoleSpec { - string name = 1 [json_name="name"]; - repeated Node indirection = 2 [json_name="indirection"]; - int32 nnames = 3 [json_name="nnames"]; - SelectStmt val = 4 [json_name="val"]; - int32 location = 5 [json_name="location"]; + RoleSpecType roletype = 1 [json_name="roletype"]; + string rolename = 2 [json_name="rolename"]; + int32 location = 3 [json_name="location"]; } -message AlterTableStmt +message FuncCall { - RangeVar relation = 1 [json_name="relation"]; - repeated Node cmds = 2 [json_name="cmds"]; - ObjectType objtype = 3 [json_name="objtype"]; - bool missing_ok = 4 [json_name="missing_ok"]; + repeated Node funcname = 1 [json_name="funcname"]; + repeated Node args = 2 [json_name="args"]; + repeated Node agg_order = 3 [json_name="agg_order"]; + Node agg_filter = 4 [json_name="agg_filter"]; + WindowDef over = 5 [json_name="over"]; + bool agg_within_group = 6 [json_name="agg_within_group"]; + bool agg_star = 7 [json_name="agg_star"]; + bool agg_distinct = 8 [json_name="agg_distinct"]; + bool func_variadic = 9 [json_name="func_variadic"]; + CoercionForm funcformat = 10 [json_name="funcformat"]; + int32 location = 11 [json_name="location"]; } -message AlterTableCmd +message A_Star { - AlterTableType subtype = 1 [json_name="subtype"]; - string name = 2 [json_name="name"]; - int32 num = 3 [json_name="num"]; - RoleSpec newowner = 4 [json_name="newowner"]; - Node def = 5 [json_name="def"]; - DropBehavior behavior = 6 [json_name="behavior"]; - bool missing_ok = 7 [json_name="missing_ok"]; - bool recurse = 8 [json_name="recurse"]; } -message AlterDomainStmt +message A_Indices { - string subtype = 1 [json_name="subtype"]; - repeated Node type_name = 2 [json_name="typeName"]; - string name = 3 [json_name="name"]; - Node def = 4 [json_name="def"]; - DropBehavior behavior = 5 [json_name="behavior"]; - bool missing_ok = 6 [json_name="missing_ok"]; + bool is_slice = 1 [json_name="is_slice"]; + Node lidx = 2 [json_name="lidx"]; + Node uidx = 3 [json_name="uidx"]; } -message SetOperationStmt +message A_Indirection { - SetOperation op = 1 [json_name="op"]; - bool all = 2 [json_name="all"]; - Node larg = 3 [json_name="larg"]; - Node rarg = 4 [json_name="rarg"]; - repeated Node col_types = 5 [json_name="colTypes"]; - repeated Node col_typmods = 6 [json_name="colTypmods"]; - repeated Node col_collations = 7 [json_name="colCollations"]; - repeated Node group_clauses = 8 [json_name="groupClauses"]; + Node arg = 1 [json_name="arg"]; + repeated Node indirection = 2 [json_name="indirection"]; } -message GrantStmt +message A_ArrayExpr { - bool is_grant = 1 [json_name="is_grant"]; - GrantTargetType targtype = 2 [json_name="targtype"]; - ObjectType objtype = 3 [json_name="objtype"]; - repeated Node objects = 4 [json_name="objects"]; - repeated Node privileges = 5 [json_name="privileges"]; - repeated Node grantees = 6 [json_name="grantees"]; - bool grant_option = 7 [json_name="grant_option"]; - RoleSpec grantor = 8 [json_name="grantor"]; - DropBehavior behavior = 9 [json_name="behavior"]; + repeated Node elements = 1 [json_name="elements"]; + int32 location = 2 [json_name="location"]; } -message GrantRoleStmt +message ResTarget { - repeated Node granted_roles = 1 [json_name="granted_roles"]; - repeated Node grantee_roles = 2 [json_name="grantee_roles"]; - bool is_grant = 3 [json_name="is_grant"]; - bool admin_opt = 4 [json_name="admin_opt"]; - RoleSpec grantor = 5 [json_name="grantor"]; - DropBehavior behavior = 6 [json_name="behavior"]; + string name = 1 [json_name="name"]; + repeated Node indirection = 2 [json_name="indirection"]; + Node val = 3 [json_name="val"]; + int32 location = 4 [json_name="location"]; } -message AlterDefaultPrivilegesStmt +message MultiAssignRef { - repeated Node options = 1 [json_name="options"]; - GrantStmt action = 2 [json_name="action"]; + Node source = 1 [json_name="source"]; + int32 colno = 2 [json_name="colno"]; + int32 ncolumns = 3 [json_name="ncolumns"]; } -message ClosePortalStmt +message SortBy { - string portalname = 1 [json_name="portalname"]; + Node node = 1 [json_name="node"]; + SortByDir sortby_dir = 2 [json_name="sortby_dir"]; + SortByNulls sortby_nulls = 3 [json_name="sortby_nulls"]; + repeated Node use_op = 4 [json_name="useOp"]; + int32 location = 5 [json_name="location"]; } -message ClusterStmt +message WindowDef { - RangeVar relation = 1 [json_name="relation"]; - string indexname = 2 [json_name="indexname"]; - repeated Node params = 3 [json_name="params"]; + string name = 1 [json_name="name"]; + string refname = 2 [json_name="refname"]; + repeated Node partition_clause = 3 [json_name="partitionClause"]; + repeated Node order_clause = 4 [json_name="orderClause"]; + int32 frame_options = 5 [json_name="frameOptions"]; + Node start_offset = 6 [json_name="startOffset"]; + Node end_offset = 7 [json_name="endOffset"]; + int32 location = 8 [json_name="location"]; } -message CopyStmt +message RangeSubselect { - RangeVar relation = 1 [json_name="relation"]; - Node query = 2 [json_name="query"]; - repeated Node attlist = 3 [json_name="attlist"]; - bool is_from = 4 [json_name="is_from"]; - bool is_program = 5 [json_name="is_program"]; - string filename = 6 [json_name="filename"]; - repeated Node options = 7 [json_name="options"]; - Node where_clause = 8 [json_name="whereClause"]; + bool lateral = 1 [json_name="lateral"]; + Node subquery = 2 [json_name="subquery"]; + Alias alias = 3 [json_name="alias"]; } -message CreateStmt +message RangeFunction { - RangeVar relation = 1 [json_name="relation"]; - repeated Node table_elts = 2 [json_name="tableElts"]; - repeated Node inh_relations = 3 [json_name="inhRelations"]; - PartitionBoundSpec partbound = 4 [json_name="partbound"]; - PartitionSpec partspec = 5 [json_name="partspec"]; - TypeName of_typename = 6 [json_name="ofTypename"]; - repeated Node constraints = 7 [json_name="constraints"]; - repeated Node options = 8 [json_name="options"]; - OnCommitAction oncommit = 9 [json_name="oncommit"]; - string tablespacename = 10 [json_name="tablespacename"]; - string access_method = 11 [json_name="accessMethod"]; - bool if_not_exists = 12 [json_name="if_not_exists"]; + bool lateral = 1 [json_name="lateral"]; + bool ordinality = 2 [json_name="ordinality"]; + bool is_rowsfrom = 3 [json_name="is_rowsfrom"]; + repeated Node functions = 4 [json_name="functions"]; + Alias alias = 5 [json_name="alias"]; + repeated Node coldeflist = 6 [json_name="coldeflist"]; } -message DefineStmt +message RangeTableFunc { - ObjectType kind = 1 [json_name="kind"]; - bool oldstyle = 2 [json_name="oldstyle"]; - repeated Node defnames = 3 [json_name="defnames"]; - repeated Node args = 4 [json_name="args"]; - repeated Node definition = 5 [json_name="definition"]; - bool if_not_exists = 6 [json_name="if_not_exists"]; - bool replace = 7 [json_name="replace"]; + bool lateral = 1 [json_name="lateral"]; + Node docexpr = 2 [json_name="docexpr"]; + Node rowexpr = 3 [json_name="rowexpr"]; + repeated Node namespaces = 4 [json_name="namespaces"]; + repeated Node columns = 5 [json_name="columns"]; + Alias alias = 6 [json_name="alias"]; + int32 location = 7 [json_name="location"]; } -message DropStmt +message RangeTableFuncCol { - repeated Node objects = 1 [json_name="objects"]; - ObjectType remove_type = 2 [json_name="removeType"]; - DropBehavior behavior = 3 [json_name="behavior"]; - bool missing_ok = 4 [json_name="missing_ok"]; - bool concurrent = 5 [json_name="concurrent"]; + string colname = 1 [json_name="colname"]; + TypeName type_name = 2 [json_name="typeName"]; + bool for_ordinality = 3 [json_name="for_ordinality"]; + bool is_not_null = 4 [json_name="is_not_null"]; + Node colexpr = 5 [json_name="colexpr"]; + Node coldefexpr = 6 [json_name="coldefexpr"]; + int32 location = 7 [json_name="location"]; } -message TruncateStmt +message RangeTableSample { - repeated Node relations = 1 [json_name="relations"]; - bool restart_seqs = 2 [json_name="restart_seqs"]; - DropBehavior behavior = 3 [json_name="behavior"]; + Node relation = 1 [json_name="relation"]; + repeated Node method = 2 [json_name="method"]; + repeated Node args = 3 [json_name="args"]; + Node repeatable = 4 [json_name="repeatable"]; + int32 location = 5 [json_name="location"]; } -message CommentStmt +message ColumnDef { - ObjectType objtype = 1 [json_name="objtype"]; - Node object = 2 [json_name="object"]; - string comment = 3 [json_name="comment"]; + string colname = 1 [json_name="colname"]; + TypeName type_name = 2 [json_name="typeName"]; + string compression = 3 [json_name="compression"]; + int32 inhcount = 4 [json_name="inhcount"]; + bool is_local = 5 [json_name="is_local"]; + bool is_not_null = 6 [json_name="is_not_null"]; + bool is_from_type = 7 [json_name="is_from_type"]; + string storage = 8 [json_name="storage"]; + string storage_name = 9 [json_name="storage_name"]; + Node raw_default = 10 [json_name="raw_default"]; + Node cooked_default = 11 [json_name="cooked_default"]; + string identity = 12 [json_name="identity"]; + RangeVar identity_sequence = 13 [json_name="identitySequence"]; + string generated = 14 [json_name="generated"]; + CollateClause coll_clause = 15 [json_name="collClause"]; + uint32 coll_oid = 16 [json_name="collOid"]; + repeated Node constraints = 17 [json_name="constraints"]; + repeated Node fdwoptions = 18 [json_name="fdwoptions"]; + int32 location = 19 [json_name="location"]; } -message FetchStmt +message TableLikeClause { - FetchDirection direction = 1 [json_name="direction"]; - int64 how_many = 2 [json_name="howMany"]; - string portalname = 3 [json_name="portalname"]; - bool ismove = 4 [json_name="ismove"]; + RangeVar relation = 1 [json_name="relation"]; + uint32 options = 2 [json_name="options"]; + uint32 relation_oid = 3 [json_name="relationOid"]; } -message IndexStmt +message IndexElem { - string idxname = 1 [json_name="idxname"]; - RangeVar relation = 2 [json_name="relation"]; - string access_method = 3 [json_name="accessMethod"]; - string table_space = 4 [json_name="tableSpace"]; - repeated Node index_params = 5 [json_name="indexParams"]; - repeated Node index_including_params = 6 [json_name="indexIncludingParams"]; - repeated Node options = 7 [json_name="options"]; - Node where_clause = 8 [json_name="whereClause"]; - repeated Node exclude_op_names = 9 [json_name="excludeOpNames"]; - string idxcomment = 10 [json_name="idxcomment"]; - uint32 index_oid = 11 [json_name="indexOid"]; - uint32 old_node = 12 [json_name="oldNode"]; - uint32 old_create_subid = 13 [json_name="oldCreateSubid"]; - uint32 old_first_relfilenode_subid = 14 [json_name="oldFirstRelfilenodeSubid"]; - bool unique = 15 [json_name="unique"]; - bool nulls_not_distinct = 16 [json_name="nulls_not_distinct"]; - bool primary = 17 [json_name="primary"]; - bool isconstraint = 18 [json_name="isconstraint"]; - bool deferrable = 19 [json_name="deferrable"]; - bool initdeferred = 20 [json_name="initdeferred"]; - bool transformed = 21 [json_name="transformed"]; - bool concurrent = 22 [json_name="concurrent"]; - bool if_not_exists = 23 [json_name="if_not_exists"]; - bool reset_default_tblspc = 24 [json_name="reset_default_tblspc"]; + string name = 1 [json_name="name"]; + Node expr = 2 [json_name="expr"]; + string indexcolname = 3 [json_name="indexcolname"]; + repeated Node collation = 4 [json_name="collation"]; + repeated Node opclass = 5 [json_name="opclass"]; + repeated Node opclassopts = 6 [json_name="opclassopts"]; + SortByDir ordering = 7 [json_name="ordering"]; + SortByNulls nulls_ordering = 8 [json_name="nulls_ordering"]; } -message CreateFunctionStmt +message DefElem { - bool is_procedure = 1 [json_name="is_procedure"]; - bool replace = 2 [json_name="replace"]; - repeated Node funcname = 3 [json_name="funcname"]; - repeated Node parameters = 4 [json_name="parameters"]; - TypeName return_type = 5 [json_name="returnType"]; - repeated Node options = 6 [json_name="options"]; - Node sql_body = 7 [json_name="sql_body"]; + string defnamespace = 1 [json_name="defnamespace"]; + string defname = 2 [json_name="defname"]; + Node arg = 3 [json_name="arg"]; + DefElemAction defaction = 4 [json_name="defaction"]; + int32 location = 5 [json_name="location"]; } -message AlterFunctionStmt +message LockingClause { - ObjectType objtype = 1 [json_name="objtype"]; - ObjectWithArgs func = 2 [json_name="func"]; - repeated Node actions = 3 [json_name="actions"]; + repeated Node locked_rels = 1 [json_name="lockedRels"]; + LockClauseStrength strength = 2 [json_name="strength"]; + LockWaitPolicy wait_policy = 3 [json_name="waitPolicy"]; } -message DoStmt +message XmlSerialize { - repeated Node args = 1 [json_name="args"]; + XmlOptionType xmloption = 1 [json_name="xmloption"]; + Node expr = 2 [json_name="expr"]; + TypeName type_name = 3 [json_name="typeName"]; + bool indent = 4 [json_name="indent"]; + int32 location = 5 [json_name="location"]; } -message RenameStmt +message PartitionElem { - ObjectType rename_type = 1 [json_name="renameType"]; - ObjectType relation_type = 2 [json_name="relationType"]; - RangeVar relation = 3 [json_name="relation"]; - Node object = 4 [json_name="object"]; - string subname = 5 [json_name="subname"]; - string newname = 6 [json_name="newname"]; - DropBehavior behavior = 7 [json_name="behavior"]; - bool missing_ok = 8 [json_name="missing_ok"]; + string name = 1 [json_name="name"]; + Node expr = 2 [json_name="expr"]; + repeated Node collation = 3 [json_name="collation"]; + repeated Node opclass = 4 [json_name="opclass"]; + int32 location = 5 [json_name="location"]; } -message RuleStmt +message PartitionSpec { - RangeVar relation = 1 [json_name="relation"]; - string rulename = 2 [json_name="rulename"]; - Node where_clause = 3 [json_name="whereClause"]; - CmdType event = 4 [json_name="event"]; - bool instead = 5 [json_name="instead"]; - repeated Node actions = 6 [json_name="actions"]; - bool replace = 7 [json_name="replace"]; + PartitionStrategy strategy = 1 [json_name="strategy"]; + repeated Node part_params = 2 [json_name="partParams"]; + int32 location = 3 [json_name="location"]; } -message NotifyStmt +message PartitionBoundSpec { - string conditionname = 1 [json_name="conditionname"]; - string payload = 2 [json_name="payload"]; + string strategy = 1 [json_name="strategy"]; + bool is_default = 2 [json_name="is_default"]; + int32 modulus = 3 [json_name="modulus"]; + int32 remainder = 4 [json_name="remainder"]; + repeated Node listdatums = 5 [json_name="listdatums"]; + repeated Node lowerdatums = 6 [json_name="lowerdatums"]; + repeated Node upperdatums = 7 [json_name="upperdatums"]; + int32 location = 8 [json_name="location"]; } -message ListenStmt +message PartitionRangeDatum { - string conditionname = 1 [json_name="conditionname"]; + PartitionRangeDatumKind kind = 1 [json_name="kind"]; + Node value = 2 [json_name="value"]; + int32 location = 3 [json_name="location"]; } -message UnlistenStmt +message PartitionCmd { - string conditionname = 1 [json_name="conditionname"]; + RangeVar name = 1 [json_name="name"]; + PartitionBoundSpec bound = 2 [json_name="bound"]; + bool concurrent = 3 [json_name="concurrent"]; } -message TransactionStmt +message RangeTblEntry { - TransactionStmtKind kind = 1 [json_name="kind"]; - repeated Node options = 2 [json_name="options"]; - string savepoint_name = 3 [json_name="savepoint_name"]; - string gid = 4 [json_name="gid"]; - bool chain = 5 [json_name="chain"]; + RTEKind rtekind = 1 [json_name="rtekind"]; + uint32 relid = 2 [json_name="relid"]; + string relkind = 3 [json_name="relkind"]; + int32 rellockmode = 4 [json_name="rellockmode"]; + TableSampleClause tablesample = 5 [json_name="tablesample"]; + uint32 perminfoindex = 6 [json_name="perminfoindex"]; + Query subquery = 7 [json_name="subquery"]; + bool security_barrier = 8 [json_name="security_barrier"]; + JoinType jointype = 9 [json_name="jointype"]; + int32 joinmergedcols = 10 [json_name="joinmergedcols"]; + repeated Node joinaliasvars = 11 [json_name="joinaliasvars"]; + repeated Node joinleftcols = 12 [json_name="joinleftcols"]; + repeated Node joinrightcols = 13 [json_name="joinrightcols"]; + Alias join_using_alias = 14 [json_name="join_using_alias"]; + repeated Node functions = 15 [json_name="functions"]; + bool funcordinality = 16 [json_name="funcordinality"]; + TableFunc tablefunc = 17 [json_name="tablefunc"]; + repeated Node values_lists = 18 [json_name="values_lists"]; + string ctename = 19 [json_name="ctename"]; + uint32 ctelevelsup = 20 [json_name="ctelevelsup"]; + bool self_reference = 21 [json_name="self_reference"]; + repeated Node coltypes = 22 [json_name="coltypes"]; + repeated Node coltypmods = 23 [json_name="coltypmods"]; + repeated Node colcollations = 24 [json_name="colcollations"]; + string enrname = 25 [json_name="enrname"]; + double enrtuples = 26 [json_name="enrtuples"]; + Alias alias = 27 [json_name="alias"]; + Alias eref = 28 [json_name="eref"]; + bool lateral = 29 [json_name="lateral"]; + bool inh = 30 [json_name="inh"]; + bool in_from_cl = 31 [json_name="inFromCl"]; + repeated Node security_quals = 32 [json_name="securityQuals"]; +} + +message RTEPermissionInfo +{ + uint32 relid = 1 [json_name="relid"]; + bool inh = 2 [json_name="inh"]; + int64 required_perms = 3 [json_name="requiredPerms"]; + uint32 check_as_user = 4 [json_name="checkAsUser"]; + repeated uint64 selected_cols = 5 [json_name="selectedCols"]; + repeated uint64 inserted_cols = 6 [json_name="insertedCols"]; + repeated uint64 updated_cols = 7 [json_name="updatedCols"]; } -message ViewStmt +message RangeTblFunction { - RangeVar view = 1 [json_name="view"]; - repeated Node aliases = 2 [json_name="aliases"]; - Node query = 3 [json_name="query"]; - bool replace = 4 [json_name="replace"]; - repeated Node options = 5 [json_name="options"]; - ViewCheckOption with_check_option = 6 [json_name="withCheckOption"]; + Node funcexpr = 1 [json_name="funcexpr"]; + int32 funccolcount = 2 [json_name="funccolcount"]; + repeated Node funccolnames = 3 [json_name="funccolnames"]; + repeated Node funccoltypes = 4 [json_name="funccoltypes"]; + repeated Node funccoltypmods = 5 [json_name="funccoltypmods"]; + repeated Node funccolcollations = 6 [json_name="funccolcollations"]; + repeated uint64 funcparams = 7 [json_name="funcparams"]; } -message LoadStmt +message TableSampleClause { - string filename = 1 [json_name="filename"]; + uint32 tsmhandler = 1 [json_name="tsmhandler"]; + repeated Node args = 2 [json_name="args"]; + Node repeatable = 3 [json_name="repeatable"]; } -message CreateDomainStmt +message WithCheckOption { - repeated Node domainname = 1 [json_name="domainname"]; - TypeName type_name = 2 [json_name="typeName"]; - CollateClause coll_clause = 3 [json_name="collClause"]; - repeated Node constraints = 4 [json_name="constraints"]; + WCOKind kind = 1 [json_name="kind"]; + string relname = 2 [json_name="relname"]; + string polname = 3 [json_name="polname"]; + Node qual = 4 [json_name="qual"]; + bool cascaded = 5 [json_name="cascaded"]; } -message CreatedbStmt +message SortGroupClause { - string dbname = 1 [json_name="dbname"]; - repeated Node options = 2 [json_name="options"]; + uint32 tle_sort_group_ref = 1 [json_name="tleSortGroupRef"]; + uint32 eqop = 2 [json_name="eqop"]; + uint32 sortop = 3 [json_name="sortop"]; + bool nulls_first = 4 [json_name="nulls_first"]; + bool hashable = 5 [json_name="hashable"]; } -message DropdbStmt +message GroupingSet { - string dbname = 1 [json_name="dbname"]; - bool missing_ok = 2 [json_name="missing_ok"]; - repeated Node options = 3 [json_name="options"]; + GroupingSetKind kind = 1 [json_name="kind"]; + repeated Node content = 2 [json_name="content"]; + int32 location = 3 [json_name="location"]; } -message VacuumStmt +message WindowClause { - repeated Node options = 1 [json_name="options"]; - repeated Node rels = 2 [json_name="rels"]; - bool is_vacuumcmd = 3 [json_name="is_vacuumcmd"]; + string name = 1 [json_name="name"]; + string refname = 2 [json_name="refname"]; + repeated Node partition_clause = 3 [json_name="partitionClause"]; + repeated Node order_clause = 4 [json_name="orderClause"]; + int32 frame_options = 5 [json_name="frameOptions"]; + Node start_offset = 6 [json_name="startOffset"]; + Node end_offset = 7 [json_name="endOffset"]; + repeated Node run_condition = 8 [json_name="runCondition"]; + uint32 start_in_range_func = 9 [json_name="startInRangeFunc"]; + uint32 end_in_range_func = 10 [json_name="endInRangeFunc"]; + uint32 in_range_coll = 11 [json_name="inRangeColl"]; + bool in_range_asc = 12 [json_name="inRangeAsc"]; + bool in_range_nulls_first = 13 [json_name="inRangeNullsFirst"]; + uint32 winref = 14 [json_name="winref"]; + bool copied_order = 15 [json_name="copiedOrder"]; } -message ExplainStmt +message RowMarkClause { - Node query = 1 [json_name="query"]; - repeated Node options = 2 [json_name="options"]; + uint32 rti = 1 [json_name="rti"]; + LockClauseStrength strength = 2 [json_name="strength"]; + LockWaitPolicy wait_policy = 3 [json_name="waitPolicy"]; + bool pushed_down = 4 [json_name="pushedDown"]; } -message CreateTableAsStmt +message WithClause { - Node query = 1 [json_name="query"]; - IntoClause into = 2 [json_name="into"]; - ObjectType objtype = 3 [json_name="objtype"]; - bool is_select_into = 4 [json_name="is_select_into"]; - bool if_not_exists = 5 [json_name="if_not_exists"]; + repeated Node ctes = 1 [json_name="ctes"]; + bool recursive = 2 [json_name="recursive"]; + int32 location = 3 [json_name="location"]; } -message CreateSeqStmt +message InferClause { - RangeVar sequence = 1 [json_name="sequence"]; - repeated Node options = 2 [json_name="options"]; - uint32 owner_id = 3 [json_name="ownerId"]; - bool for_identity = 4 [json_name="for_identity"]; - bool if_not_exists = 5 [json_name="if_not_exists"]; + repeated Node index_elems = 1 [json_name="indexElems"]; + Node where_clause = 2 [json_name="whereClause"]; + string conname = 3 [json_name="conname"]; + int32 location = 4 [json_name="location"]; } -message AlterSeqStmt +message OnConflictClause { - RangeVar sequence = 1 [json_name="sequence"]; - repeated Node options = 2 [json_name="options"]; - bool for_identity = 3 [json_name="for_identity"]; - bool missing_ok = 4 [json_name="missing_ok"]; + OnConflictAction action = 1 [json_name="action"]; + InferClause infer = 2 [json_name="infer"]; + repeated Node target_list = 3 [json_name="targetList"]; + Node where_clause = 4 [json_name="whereClause"]; + int32 location = 5 [json_name="location"]; } -message VariableSetStmt +message CTESearchClause { - VariableSetKind kind = 1 [json_name="kind"]; - string name = 2 [json_name="name"]; - repeated Node args = 3 [json_name="args"]; - bool is_local = 4 [json_name="is_local"]; + repeated Node search_col_list = 1 [json_name="search_col_list"]; + bool search_breadth_first = 2 [json_name="search_breadth_first"]; + string search_seq_column = 3 [json_name="search_seq_column"]; + int32 location = 4 [json_name="location"]; } -message VariableShowStmt +message CTECycleClause +{ + repeated Node cycle_col_list = 1 [json_name="cycle_col_list"]; + string cycle_mark_column = 2 [json_name="cycle_mark_column"]; + Node cycle_mark_value = 3 [json_name="cycle_mark_value"]; + Node cycle_mark_default = 4 [json_name="cycle_mark_default"]; + string cycle_path_column = 5 [json_name="cycle_path_column"]; + int32 location = 6 [json_name="location"]; + uint32 cycle_mark_type = 7 [json_name="cycle_mark_type"]; + int32 cycle_mark_typmod = 8 [json_name="cycle_mark_typmod"]; + uint32 cycle_mark_collation = 9 [json_name="cycle_mark_collation"]; + uint32 cycle_mark_neop = 10 [json_name="cycle_mark_neop"]; +} + +message CommonTableExpr +{ + string ctename = 1 [json_name="ctename"]; + repeated Node aliascolnames = 2 [json_name="aliascolnames"]; + CTEMaterialize ctematerialized = 3 [json_name="ctematerialized"]; + Node ctequery = 4 [json_name="ctequery"]; + CTESearchClause search_clause = 5 [json_name="search_clause"]; + CTECycleClause cycle_clause = 6 [json_name="cycle_clause"]; + int32 location = 7 [json_name="location"]; + bool cterecursive = 8 [json_name="cterecursive"]; + int32 cterefcount = 9 [json_name="cterefcount"]; + repeated Node ctecolnames = 10 [json_name="ctecolnames"]; + repeated Node ctecoltypes = 11 [json_name="ctecoltypes"]; + repeated Node ctecoltypmods = 12 [json_name="ctecoltypmods"]; + repeated Node ctecolcollations = 13 [json_name="ctecolcollations"]; +} + +message MergeWhenClause +{ + bool matched = 1 [json_name="matched"]; + CmdType command_type = 2 [json_name="commandType"]; + OverridingKind override = 3 [json_name="override"]; + Node condition = 4 [json_name="condition"]; + repeated Node target_list = 5 [json_name="targetList"]; + repeated Node values = 6 [json_name="values"]; +} + +message MergeAction +{ + bool matched = 1 [json_name="matched"]; + CmdType command_type = 2 [json_name="commandType"]; + OverridingKind override = 3 [json_name="override"]; + Node qual = 4 [json_name="qual"]; + repeated Node target_list = 5 [json_name="targetList"]; + repeated Node update_colnos = 6 [json_name="updateColnos"]; +} + +message TriggerTransition { string name = 1 [json_name="name"]; + bool is_new = 2 [json_name="isNew"]; + bool is_table = 3 [json_name="isTable"]; } -message DiscardStmt +message JsonOutput { - DiscardMode target = 1 [json_name="target"]; + TypeName type_name = 1 [json_name="typeName"]; + JsonReturning returning = 2 [json_name="returning"]; } -message CreateTrigStmt +message JsonKeyValue { - bool replace = 1 [json_name="replace"]; - bool isconstraint = 2 [json_name="isconstraint"]; - string trigname = 3 [json_name="trigname"]; - RangeVar relation = 4 [json_name="relation"]; - repeated Node funcname = 5 [json_name="funcname"]; - repeated Node args = 6 [json_name="args"]; - bool row = 7 [json_name="row"]; - int32 timing = 8 [json_name="timing"]; - int32 events = 9 [json_name="events"]; - repeated Node columns = 10 [json_name="columns"]; - Node when_clause = 11 [json_name="whenClause"]; - repeated Node transition_rels = 12 [json_name="transitionRels"]; - bool deferrable = 13 [json_name="deferrable"]; - bool initdeferred = 14 [json_name="initdeferred"]; - RangeVar constrrel = 15 [json_name="constrrel"]; + Node key = 1 [json_name="key"]; + JsonValueExpr value = 2 [json_name="value"]; } -message CreatePLangStmt +message JsonObjectConstructor { - bool replace = 1 [json_name="replace"]; - string plname = 2 [json_name="plname"]; - repeated Node plhandler = 3 [json_name="plhandler"]; - repeated Node plinline = 4 [json_name="plinline"]; - repeated Node plvalidator = 5 [json_name="plvalidator"]; - bool pltrusted = 6 [json_name="pltrusted"]; + repeated Node exprs = 1 [json_name="exprs"]; + JsonOutput output = 2 [json_name="output"]; + bool absent_on_null = 3 [json_name="absent_on_null"]; + bool unique = 4 [json_name="unique"]; + int32 location = 5 [json_name="location"]; +} + +message JsonArrayConstructor +{ + repeated Node exprs = 1 [json_name="exprs"]; + JsonOutput output = 2 [json_name="output"]; + bool absent_on_null = 3 [json_name="absent_on_null"]; + int32 location = 4 [json_name="location"]; +} + +message JsonArrayQueryConstructor +{ + Node query = 1 [json_name="query"]; + JsonOutput output = 2 [json_name="output"]; + JsonFormat format = 3 [json_name="format"]; + bool absent_on_null = 4 [json_name="absent_on_null"]; + int32 location = 5 [json_name="location"]; +} + +message JsonAggConstructor +{ + JsonOutput output = 1 [json_name="output"]; + Node agg_filter = 2 [json_name="agg_filter"]; + repeated Node agg_order = 3 [json_name="agg_order"]; + WindowDef over = 4 [json_name="over"]; + int32 location = 5 [json_name="location"]; +} + +message JsonObjectAgg +{ + JsonAggConstructor constructor = 1 [json_name="constructor"]; + JsonKeyValue arg = 2 [json_name="arg"]; + bool absent_on_null = 3 [json_name="absent_on_null"]; + bool unique = 4 [json_name="unique"]; +} + +message JsonArrayAgg +{ + JsonAggConstructor constructor = 1 [json_name="constructor"]; + JsonValueExpr arg = 2 [json_name="arg"]; + bool absent_on_null = 3 [json_name="absent_on_null"]; +} + +message RawStmt +{ + Node stmt = 1 [json_name="stmt"]; + int32 stmt_location = 2 [json_name="stmt_location"]; + int32 stmt_len = 3 [json_name="stmt_len"]; +} + +message InsertStmt +{ + RangeVar relation = 1 [json_name="relation"]; + repeated Node cols = 2 [json_name="cols"]; + Node select_stmt = 3 [json_name="selectStmt"]; + OnConflictClause on_conflict_clause = 4 [json_name="onConflictClause"]; + repeated Node returning_list = 5 [json_name="returningList"]; + WithClause with_clause = 6 [json_name="withClause"]; + OverridingKind override = 7 [json_name="override"]; } -message CreateRoleStmt +message DeleteStmt { - RoleStmtType stmt_type = 1 [json_name="stmt_type"]; - string role = 2 [json_name="role"]; - repeated Node options = 3 [json_name="options"]; + RangeVar relation = 1 [json_name="relation"]; + repeated Node using_clause = 2 [json_name="usingClause"]; + Node where_clause = 3 [json_name="whereClause"]; + repeated Node returning_list = 4 [json_name="returningList"]; + WithClause with_clause = 5 [json_name="withClause"]; } -message AlterRoleStmt +message UpdateStmt { - RoleSpec role = 1 [json_name="role"]; - repeated Node options = 2 [json_name="options"]; - int32 action = 3 [json_name="action"]; + RangeVar relation = 1 [json_name="relation"]; + repeated Node target_list = 2 [json_name="targetList"]; + Node where_clause = 3 [json_name="whereClause"]; + repeated Node from_clause = 4 [json_name="fromClause"]; + repeated Node returning_list = 5 [json_name="returningList"]; + WithClause with_clause = 6 [json_name="withClause"]; } -message DropRoleStmt +message MergeStmt { - repeated Node roles = 1 [json_name="roles"]; - bool missing_ok = 2 [json_name="missing_ok"]; + RangeVar relation = 1 [json_name="relation"]; + Node source_relation = 2 [json_name="sourceRelation"]; + Node join_condition = 3 [json_name="joinCondition"]; + repeated Node merge_when_clauses = 4 [json_name="mergeWhenClauses"]; + WithClause with_clause = 5 [json_name="withClause"]; } -message LockStmt +message SelectStmt { - repeated Node relations = 1 [json_name="relations"]; - int32 mode = 2 [json_name="mode"]; - bool nowait = 3 [json_name="nowait"]; + repeated Node distinct_clause = 1 [json_name="distinctClause"]; + IntoClause into_clause = 2 [json_name="intoClause"]; + repeated Node target_list = 3 [json_name="targetList"]; + repeated Node from_clause = 4 [json_name="fromClause"]; + Node where_clause = 5 [json_name="whereClause"]; + repeated Node group_clause = 6 [json_name="groupClause"]; + bool group_distinct = 7 [json_name="groupDistinct"]; + Node having_clause = 8 [json_name="havingClause"]; + repeated Node window_clause = 9 [json_name="windowClause"]; + repeated Node values_lists = 10 [json_name="valuesLists"]; + repeated Node sort_clause = 11 [json_name="sortClause"]; + Node limit_offset = 12 [json_name="limitOffset"]; + Node limit_count = 13 [json_name="limitCount"]; + LimitOption limit_option = 14 [json_name="limitOption"]; + repeated Node locking_clause = 15 [json_name="lockingClause"]; + WithClause with_clause = 16 [json_name="withClause"]; + SetOperation op = 17 [json_name="op"]; + bool all = 18 [json_name="all"]; + SelectStmt larg = 19 [json_name="larg"]; + SelectStmt rarg = 20 [json_name="rarg"]; } -message ConstraintsSetStmt +message SetOperationStmt { - repeated Node constraints = 1 [json_name="constraints"]; - bool deferred = 2 [json_name="deferred"]; + SetOperation op = 1 [json_name="op"]; + bool all = 2 [json_name="all"]; + Node larg = 3 [json_name="larg"]; + Node rarg = 4 [json_name="rarg"]; + repeated Node col_types = 5 [json_name="colTypes"]; + repeated Node col_typmods = 6 [json_name="colTypmods"]; + repeated Node col_collations = 7 [json_name="colCollations"]; + repeated Node group_clauses = 8 [json_name="groupClauses"]; } -message ReindexStmt +message ReturnStmt { - ReindexObjectType kind = 1 [json_name="kind"]; - RangeVar relation = 2 [json_name="relation"]; - string name = 3 [json_name="name"]; - repeated Node params = 4 [json_name="params"]; + Node returnval = 1 [json_name="returnval"]; } -message CheckPointStmt +message PLAssignStmt { + string name = 1 [json_name="name"]; + repeated Node indirection = 2 [json_name="indirection"]; + int32 nnames = 3 [json_name="nnames"]; + SelectStmt val = 4 [json_name="val"]; + int32 location = 5 [json_name="location"]; } message CreateSchemaStmt @@ -1418,95 +1605,163 @@ message CreateSchemaStmt bool if_not_exists = 4 [json_name="if_not_exists"]; } -message AlterDatabaseStmt +message AlterTableStmt { - string dbname = 1 [json_name="dbname"]; - repeated Node options = 2 [json_name="options"]; + RangeVar relation = 1 [json_name="relation"]; + repeated Node cmds = 2 [json_name="cmds"]; + ObjectType objtype = 3 [json_name="objtype"]; + bool missing_ok = 4 [json_name="missing_ok"]; } -message AlterDatabaseRefreshCollStmt +message ReplicaIdentityStmt { - string dbname = 1 [json_name="dbname"]; + string identity_type = 1 [json_name="identity_type"]; + string name = 2 [json_name="name"]; } -message AlterDatabaseSetStmt +message AlterTableCmd { - string dbname = 1 [json_name="dbname"]; - VariableSetStmt setstmt = 2 [json_name="setstmt"]; + AlterTableType subtype = 1 [json_name="subtype"]; + string name = 2 [json_name="name"]; + int32 num = 3 [json_name="num"]; + RoleSpec newowner = 4 [json_name="newowner"]; + Node def = 5 [json_name="def"]; + DropBehavior behavior = 6 [json_name="behavior"]; + bool missing_ok = 7 [json_name="missing_ok"]; + bool recurse = 8 [json_name="recurse"]; } -message AlterRoleSetStmt +message AlterCollationStmt { - RoleSpec role = 1 [json_name="role"]; - string database = 2 [json_name="database"]; - VariableSetStmt setstmt = 3 [json_name="setstmt"]; + repeated Node collname = 1 [json_name="collname"]; } -message CreateConversionStmt +message AlterDomainStmt { - repeated Node conversion_name = 1 [json_name="conversion_name"]; - string for_encoding_name = 2 [json_name="for_encoding_name"]; - string to_encoding_name = 3 [json_name="to_encoding_name"]; - repeated Node func_name = 4 [json_name="func_name"]; - bool def = 5 [json_name="def"]; + string subtype = 1 [json_name="subtype"]; + repeated Node type_name = 2 [json_name="typeName"]; + string name = 3 [json_name="name"]; + Node def = 4 [json_name="def"]; + DropBehavior behavior = 5 [json_name="behavior"]; + bool missing_ok = 6 [json_name="missing_ok"]; } -message CreateCastStmt +message GrantStmt { - TypeName sourcetype = 1 [json_name="sourcetype"]; - TypeName targettype = 2 [json_name="targettype"]; - ObjectWithArgs func = 3 [json_name="func"]; - CoercionContext context = 4 [json_name="context"]; - bool inout = 5 [json_name="inout"]; + bool is_grant = 1 [json_name="is_grant"]; + GrantTargetType targtype = 2 [json_name="targtype"]; + ObjectType objtype = 3 [json_name="objtype"]; + repeated Node objects = 4 [json_name="objects"]; + repeated Node privileges = 5 [json_name="privileges"]; + repeated Node grantees = 6 [json_name="grantees"]; + bool grant_option = 7 [json_name="grant_option"]; + RoleSpec grantor = 8 [json_name="grantor"]; + DropBehavior behavior = 9 [json_name="behavior"]; } -message CreateOpClassStmt +message ObjectWithArgs { - repeated Node opclassname = 1 [json_name="opclassname"]; - repeated Node opfamilyname = 2 [json_name="opfamilyname"]; - string amname = 3 [json_name="amname"]; - TypeName datatype = 4 [json_name="datatype"]; - repeated Node items = 5 [json_name="items"]; - bool is_default = 6 [json_name="isDefault"]; + repeated Node objname = 1 [json_name="objname"]; + repeated Node objargs = 2 [json_name="objargs"]; + repeated Node objfuncargs = 3 [json_name="objfuncargs"]; + bool args_unspecified = 4 [json_name="args_unspecified"]; } -message CreateOpFamilyStmt +message AccessPriv { - repeated Node opfamilyname = 1 [json_name="opfamilyname"]; - string amname = 2 [json_name="amname"]; + string priv_name = 1 [json_name="priv_name"]; + repeated Node cols = 2 [json_name="cols"]; } -message AlterOpFamilyStmt +message GrantRoleStmt { - repeated Node opfamilyname = 1 [json_name="opfamilyname"]; - string amname = 2 [json_name="amname"]; - bool is_drop = 3 [json_name="isDrop"]; - repeated Node items = 4 [json_name="items"]; + repeated Node granted_roles = 1 [json_name="granted_roles"]; + repeated Node grantee_roles = 2 [json_name="grantee_roles"]; + bool is_grant = 3 [json_name="is_grant"]; + repeated Node opt = 4 [json_name="opt"]; + RoleSpec grantor = 5 [json_name="grantor"]; + DropBehavior behavior = 6 [json_name="behavior"]; } -message PrepareStmt +message AlterDefaultPrivilegesStmt { - string name = 1 [json_name="name"]; - repeated Node argtypes = 2 [json_name="argtypes"]; - Node query = 3 [json_name="query"]; + repeated Node options = 1 [json_name="options"]; + GrantStmt action = 2 [json_name="action"]; } -message ExecuteStmt +message CopyStmt { - string name = 1 [json_name="name"]; - repeated Node params = 2 [json_name="params"]; + RangeVar relation = 1 [json_name="relation"]; + Node query = 2 [json_name="query"]; + repeated Node attlist = 3 [json_name="attlist"]; + bool is_from = 4 [json_name="is_from"]; + bool is_program = 5 [json_name="is_program"]; + string filename = 6 [json_name="filename"]; + repeated Node options = 7 [json_name="options"]; + Node where_clause = 8 [json_name="whereClause"]; } -message DeallocateStmt +message VariableSetStmt +{ + VariableSetKind kind = 1 [json_name="kind"]; + string name = 2 [json_name="name"]; + repeated Node args = 3 [json_name="args"]; + bool is_local = 4 [json_name="is_local"]; +} + +message VariableShowStmt { string name = 1 [json_name="name"]; } -message DeclareCursorStmt +message CreateStmt { - string portalname = 1 [json_name="portalname"]; - int32 options = 2 [json_name="options"]; - Node query = 3 [json_name="query"]; + RangeVar relation = 1 [json_name="relation"]; + repeated Node table_elts = 2 [json_name="tableElts"]; + repeated Node inh_relations = 3 [json_name="inhRelations"]; + PartitionBoundSpec partbound = 4 [json_name="partbound"]; + PartitionSpec partspec = 5 [json_name="partspec"]; + TypeName of_typename = 6 [json_name="ofTypename"]; + repeated Node constraints = 7 [json_name="constraints"]; + repeated Node options = 8 [json_name="options"]; + OnCommitAction oncommit = 9 [json_name="oncommit"]; + string tablespacename = 10 [json_name="tablespacename"]; + string access_method = 11 [json_name="accessMethod"]; + bool if_not_exists = 12 [json_name="if_not_exists"]; +} + +message Constraint +{ + ConstrType contype = 1 [json_name="contype"]; + string conname = 2 [json_name="conname"]; + bool deferrable = 3 [json_name="deferrable"]; + bool initdeferred = 4 [json_name="initdeferred"]; + int32 location = 5 [json_name="location"]; + bool is_no_inherit = 6 [json_name="is_no_inherit"]; + Node raw_expr = 7 [json_name="raw_expr"]; + string cooked_expr = 8 [json_name="cooked_expr"]; + string generated_when = 9 [json_name="generated_when"]; + bool nulls_not_distinct = 10 [json_name="nulls_not_distinct"]; + repeated Node keys = 11 [json_name="keys"]; + repeated Node including = 12 [json_name="including"]; + repeated Node exclusions = 13 [json_name="exclusions"]; + repeated Node options = 14 [json_name="options"]; + string indexname = 15 [json_name="indexname"]; + string indexspace = 16 [json_name="indexspace"]; + bool reset_default_tblspc = 17 [json_name="reset_default_tblspc"]; + string access_method = 18 [json_name="access_method"]; + Node where_clause = 19 [json_name="where_clause"]; + RangeVar pktable = 20 [json_name="pktable"]; + repeated Node fk_attrs = 21 [json_name="fk_attrs"]; + repeated Node pk_attrs = 22 [json_name="pk_attrs"]; + string fk_matchtype = 23 [json_name="fk_matchtype"]; + string fk_upd_action = 24 [json_name="fk_upd_action"]; + string fk_del_action = 25 [json_name="fk_del_action"]; + repeated Node fk_del_set_cols = 26 [json_name="fk_del_set_cols"]; + repeated Node old_conpfeqop = 27 [json_name="old_conpfeqop"]; + uint32 old_pktable_oid = 28 [json_name="old_pktable_oid"]; + bool skip_validation = 29 [json_name="skip_validation"]; + bool initially_valid = 30 [json_name="initially_valid"]; } message CreateTableSpaceStmt @@ -1523,99 +1778,41 @@ message DropTableSpaceStmt bool missing_ok = 2 [json_name="missing_ok"]; } -message AlterObjectDependsStmt -{ - ObjectType object_type = 1 [json_name="objectType"]; - RangeVar relation = 2 [json_name="relation"]; - Node object = 3 [json_name="object"]; - String extname = 4 [json_name="extname"]; - bool remove = 5 [json_name="remove"]; -} - -message AlterObjectSchemaStmt -{ - ObjectType object_type = 1 [json_name="objectType"]; - RangeVar relation = 2 [json_name="relation"]; - Node object = 3 [json_name="object"]; - string newschema = 4 [json_name="newschema"]; - bool missing_ok = 5 [json_name="missing_ok"]; -} - -message AlterOwnerStmt -{ - ObjectType object_type = 1 [json_name="objectType"]; - RangeVar relation = 2 [json_name="relation"]; - Node object = 3 [json_name="object"]; - RoleSpec newowner = 4 [json_name="newowner"]; -} - -message AlterOperatorStmt -{ - ObjectWithArgs opername = 1 [json_name="opername"]; - repeated Node options = 2 [json_name="options"]; -} - -message AlterTypeStmt +message AlterTableSpaceOptionsStmt { - repeated Node type_name = 1 [json_name="typeName"]; + string tablespacename = 1 [json_name="tablespacename"]; repeated Node options = 2 [json_name="options"]; + bool is_reset = 3 [json_name="isReset"]; } -message DropOwnedStmt -{ - repeated Node roles = 1 [json_name="roles"]; - DropBehavior behavior = 2 [json_name="behavior"]; -} - -message ReassignOwnedStmt -{ - repeated Node roles = 1 [json_name="roles"]; - RoleSpec newrole = 2 [json_name="newrole"]; -} - -message CompositeTypeStmt -{ - RangeVar typevar = 1 [json_name="typevar"]; - repeated Node coldeflist = 2 [json_name="coldeflist"]; -} - -message CreateEnumStmt -{ - repeated Node type_name = 1 [json_name="typeName"]; - repeated Node vals = 2 [json_name="vals"]; -} - -message CreateRangeStmt +message AlterTableMoveAllStmt { - repeated Node type_name = 1 [json_name="typeName"]; - repeated Node params = 2 [json_name="params"]; + string orig_tablespacename = 1 [json_name="orig_tablespacename"]; + ObjectType objtype = 2 [json_name="objtype"]; + repeated Node roles = 3 [json_name="roles"]; + string new_tablespacename = 4 [json_name="new_tablespacename"]; + bool nowait = 5 [json_name="nowait"]; } -message AlterEnumStmt +message CreateExtensionStmt { - repeated Node type_name = 1 [json_name="typeName"]; - string old_val = 2 [json_name="oldVal"]; - string new_val = 3 [json_name="newVal"]; - string new_val_neighbor = 4 [json_name="newValNeighbor"]; - bool new_val_is_after = 5 [json_name="newValIsAfter"]; - bool skip_if_new_val_exists = 6 [json_name="skipIfNewValExists"]; + string extname = 1 [json_name="extname"]; + bool if_not_exists = 2 [json_name="if_not_exists"]; + repeated Node options = 3 [json_name="options"]; } -message AlterTSDictionaryStmt +message AlterExtensionStmt { - repeated Node dictname = 1 [json_name="dictname"]; + string extname = 1 [json_name="extname"]; repeated Node options = 2 [json_name="options"]; } -message AlterTSConfigurationStmt +message AlterExtensionContentsStmt { - AlterTSConfigType kind = 1 [json_name="kind"]; - repeated Node cfgname = 2 [json_name="cfgname"]; - repeated Node tokentype = 3 [json_name="tokentype"]; - repeated Node dicts = 4 [json_name="dicts"]; - bool override = 5 [json_name="override"]; - bool replace = 6 [json_name="replace"]; - bool missing_ok = 7 [json_name="missing_ok"]; + string extname = 1 [json_name="extname"]; + int32 action = 2 [json_name="action"]; + ObjectType objtype = 3 [json_name="objtype"]; + Node object = 4 [json_name="object"]; } message CreateFdwStmt @@ -1650,6 +1847,13 @@ message AlterForeignServerStmt bool has_version = 4 [json_name="has_version"]; } +message CreateForeignTableStmt +{ + CreateStmt base_stmt = 1 [json_name="base"]; + string servername = 2 [json_name="servername"]; + repeated Node options = 3 [json_name="options"]; +} + message CreateUserMappingStmt { RoleSpec user = 1 [json_name="user"]; @@ -1672,37 +1876,6 @@ message DropUserMappingStmt bool missing_ok = 3 [json_name="missing_ok"]; } -message AlterTableSpaceOptionsStmt -{ - string tablespacename = 1 [json_name="tablespacename"]; - repeated Node options = 2 [json_name="options"]; - bool is_reset = 3 [json_name="isReset"]; -} - -message AlterTableMoveAllStmt -{ - string orig_tablespacename = 1 [json_name="orig_tablespacename"]; - ObjectType objtype = 2 [json_name="objtype"]; - repeated Node roles = 3 [json_name="roles"]; - string new_tablespacename = 4 [json_name="new_tablespacename"]; - bool nowait = 5 [json_name="nowait"]; -} - -message SecLabelStmt -{ - ObjectType objtype = 1 [json_name="objtype"]; - Node object = 2 [json_name="object"]; - string provider = 3 [json_name="provider"]; - string label = 4 [json_name="label"]; -} - -message CreateForeignTableStmt -{ - CreateStmt base_stmt = 1 [json_name="base"]; - string servername = 2 [json_name="servername"]; - repeated Node options = 3 [json_name="options"]; -} - message ImportForeignSchemaStmt { string server_name = 1 [json_name="server_name"]; @@ -1713,25 +1886,50 @@ message ImportForeignSchemaStmt repeated Node options = 6 [json_name="options"]; } -message CreateExtensionStmt +message CreatePolicyStmt { - string extname = 1 [json_name="extname"]; - bool if_not_exists = 2 [json_name="if_not_exists"]; - repeated Node options = 3 [json_name="options"]; + string policy_name = 1 [json_name="policy_name"]; + RangeVar table = 2 [json_name="table"]; + string cmd_name = 3 [json_name="cmd_name"]; + bool permissive = 4 [json_name="permissive"]; + repeated Node roles = 5 [json_name="roles"]; + Node qual = 6 [json_name="qual"]; + Node with_check = 7 [json_name="with_check"]; } -message AlterExtensionStmt +message AlterPolicyStmt { - string extname = 1 [json_name="extname"]; - repeated Node options = 2 [json_name="options"]; + string policy_name = 1 [json_name="policy_name"]; + RangeVar table = 2 [json_name="table"]; + repeated Node roles = 3 [json_name="roles"]; + Node qual = 4 [json_name="qual"]; + Node with_check = 5 [json_name="with_check"]; } -message AlterExtensionContentsStmt +message CreateAmStmt { - string extname = 1 [json_name="extname"]; - int32 action = 2 [json_name="action"]; - ObjectType objtype = 3 [json_name="objtype"]; - Node object = 4 [json_name="object"]; + string amname = 1 [json_name="amname"]; + repeated Node handler_name = 2 [json_name="handler_name"]; + string amtype = 3 [json_name="amtype"]; +} + +message CreateTrigStmt +{ + bool replace = 1 [json_name="replace"]; + bool isconstraint = 2 [json_name="isconstraint"]; + string trigname = 3 [json_name="trigname"]; + RangeVar relation = 4 [json_name="relation"]; + repeated Node funcname = 5 [json_name="funcname"]; + repeated Node args = 6 [json_name="args"]; + bool row = 7 [json_name="row"]; + int32 timing = 8 [json_name="timing"]; + int32 events = 9 [json_name="events"]; + repeated Node columns = 10 [json_name="columns"]; + Node when_clause = 11 [json_name="whenClause"]; + repeated Node transition_rels = 12 [json_name="transitionRels"]; + bool deferrable = 13 [json_name="deferrable"]; + bool initdeferred = 14 [json_name="initdeferred"]; + RangeVar constrrel = 15 [json_name="constrrel"]; } message CreateEventTrigStmt @@ -1748,99 +1946,190 @@ message AlterEventTrigStmt string tgenabled = 2 [json_name="tgenabled"]; } -message RefreshMatViewStmt +message CreatePLangStmt +{ + bool replace = 1 [json_name="replace"]; + string plname = 2 [json_name="plname"]; + repeated Node plhandler = 3 [json_name="plhandler"]; + repeated Node plinline = 4 [json_name="plinline"]; + repeated Node plvalidator = 5 [json_name="plvalidator"]; + bool pltrusted = 6 [json_name="pltrusted"]; +} + +message CreateRoleStmt +{ + RoleStmtType stmt_type = 1 [json_name="stmt_type"]; + string role = 2 [json_name="role"]; + repeated Node options = 3 [json_name="options"]; +} + +message AlterRoleStmt +{ + RoleSpec role = 1 [json_name="role"]; + repeated Node options = 2 [json_name="options"]; + int32 action = 3 [json_name="action"]; +} + +message AlterRoleSetStmt +{ + RoleSpec role = 1 [json_name="role"]; + string database = 2 [json_name="database"]; + VariableSetStmt setstmt = 3 [json_name="setstmt"]; +} + +message DropRoleStmt +{ + repeated Node roles = 1 [json_name="roles"]; + bool missing_ok = 2 [json_name="missing_ok"]; +} + +message CreateSeqStmt +{ + RangeVar sequence = 1 [json_name="sequence"]; + repeated Node options = 2 [json_name="options"]; + uint32 owner_id = 3 [json_name="ownerId"]; + bool for_identity = 4 [json_name="for_identity"]; + bool if_not_exists = 5 [json_name="if_not_exists"]; +} + +message AlterSeqStmt +{ + RangeVar sequence = 1 [json_name="sequence"]; + repeated Node options = 2 [json_name="options"]; + bool for_identity = 3 [json_name="for_identity"]; + bool missing_ok = 4 [json_name="missing_ok"]; +} + +message DefineStmt +{ + ObjectType kind = 1 [json_name="kind"]; + bool oldstyle = 2 [json_name="oldstyle"]; + repeated Node defnames = 3 [json_name="defnames"]; + repeated Node args = 4 [json_name="args"]; + repeated Node definition = 5 [json_name="definition"]; + bool if_not_exists = 6 [json_name="if_not_exists"]; + bool replace = 7 [json_name="replace"]; +} + +message CreateDomainStmt +{ + repeated Node domainname = 1 [json_name="domainname"]; + TypeName type_name = 2 [json_name="typeName"]; + CollateClause coll_clause = 3 [json_name="collClause"]; + repeated Node constraints = 4 [json_name="constraints"]; +} + +message CreateOpClassStmt { - bool concurrent = 1 [json_name="concurrent"]; - bool skip_data = 2 [json_name="skipData"]; - RangeVar relation = 3 [json_name="relation"]; + repeated Node opclassname = 1 [json_name="opclassname"]; + repeated Node opfamilyname = 2 [json_name="opfamilyname"]; + string amname = 3 [json_name="amname"]; + TypeName datatype = 4 [json_name="datatype"]; + repeated Node items = 5 [json_name="items"]; + bool is_default = 6 [json_name="isDefault"]; } -message ReplicaIdentityStmt +message CreateOpClassItem { - string identity_type = 1 [json_name="identity_type"]; - string name = 2 [json_name="name"]; + int32 itemtype = 1 [json_name="itemtype"]; + ObjectWithArgs name = 2 [json_name="name"]; + int32 number = 3 [json_name="number"]; + repeated Node order_family = 4 [json_name="order_family"]; + repeated Node class_args = 5 [json_name="class_args"]; + TypeName storedtype = 6 [json_name="storedtype"]; } -message AlterSystemStmt +message CreateOpFamilyStmt { - VariableSetStmt setstmt = 1 [json_name="setstmt"]; + repeated Node opfamilyname = 1 [json_name="opfamilyname"]; + string amname = 2 [json_name="amname"]; } -message CreatePolicyStmt +message AlterOpFamilyStmt { - string policy_name = 1 [json_name="policy_name"]; - RangeVar table = 2 [json_name="table"]; - string cmd_name = 3 [json_name="cmd_name"]; - bool permissive = 4 [json_name="permissive"]; - repeated Node roles = 5 [json_name="roles"]; - Node qual = 6 [json_name="qual"]; - Node with_check = 7 [json_name="with_check"]; + repeated Node opfamilyname = 1 [json_name="opfamilyname"]; + string amname = 2 [json_name="amname"]; + bool is_drop = 3 [json_name="isDrop"]; + repeated Node items = 4 [json_name="items"]; } -message AlterPolicyStmt +message DropStmt { - string policy_name = 1 [json_name="policy_name"]; - RangeVar table = 2 [json_name="table"]; - repeated Node roles = 3 [json_name="roles"]; - Node qual = 4 [json_name="qual"]; - Node with_check = 5 [json_name="with_check"]; + repeated Node objects = 1 [json_name="objects"]; + ObjectType remove_type = 2 [json_name="removeType"]; + DropBehavior behavior = 3 [json_name="behavior"]; + bool missing_ok = 4 [json_name="missing_ok"]; + bool concurrent = 5 [json_name="concurrent"]; } -message CreateTransformStmt +message TruncateStmt { - bool replace = 1 [json_name="replace"]; - TypeName type_name = 2 [json_name="type_name"]; - string lang = 3 [json_name="lang"]; - ObjectWithArgs fromsql = 4 [json_name="fromsql"]; - ObjectWithArgs tosql = 5 [json_name="tosql"]; + repeated Node relations = 1 [json_name="relations"]; + bool restart_seqs = 2 [json_name="restart_seqs"]; + DropBehavior behavior = 3 [json_name="behavior"]; } -message CreateAmStmt +message CommentStmt { - string amname = 1 [json_name="amname"]; - repeated Node handler_name = 2 [json_name="handler_name"]; - string amtype = 3 [json_name="amtype"]; + ObjectType objtype = 1 [json_name="objtype"]; + Node object = 2 [json_name="object"]; + string comment = 3 [json_name="comment"]; } -message CreatePublicationStmt +message SecLabelStmt { - string pubname = 1 [json_name="pubname"]; - repeated Node options = 2 [json_name="options"]; - repeated Node pubobjects = 3 [json_name="pubobjects"]; - bool for_all_tables = 4 [json_name="for_all_tables"]; + ObjectType objtype = 1 [json_name="objtype"]; + Node object = 2 [json_name="object"]; + string provider = 3 [json_name="provider"]; + string label = 4 [json_name="label"]; } -message AlterPublicationStmt +message DeclareCursorStmt { - string pubname = 1 [json_name="pubname"]; - repeated Node options = 2 [json_name="options"]; - repeated Node pubobjects = 3 [json_name="pubobjects"]; - bool for_all_tables = 4 [json_name="for_all_tables"]; - AlterPublicationAction action = 5 [json_name="action"]; + string portalname = 1 [json_name="portalname"]; + int32 options = 2 [json_name="options"]; + Node query = 3 [json_name="query"]; } -message CreateSubscriptionStmt +message ClosePortalStmt { - string subname = 1 [json_name="subname"]; - string conninfo = 2 [json_name="conninfo"]; - repeated Node publication = 3 [json_name="publication"]; - repeated Node options = 4 [json_name="options"]; + string portalname = 1 [json_name="portalname"]; } -message AlterSubscriptionStmt +message FetchStmt { - AlterSubscriptionType kind = 1 [json_name="kind"]; - string subname = 2 [json_name="subname"]; - string conninfo = 3 [json_name="conninfo"]; - repeated Node publication = 4 [json_name="publication"]; - repeated Node options = 5 [json_name="options"]; + FetchDirection direction = 1 [json_name="direction"]; + int64 how_many = 2 [json_name="howMany"]; + string portalname = 3 [json_name="portalname"]; + bool ismove = 4 [json_name="ismove"]; } -message DropSubscriptionStmt +message IndexStmt { - string subname = 1 [json_name="subname"]; - bool missing_ok = 2 [json_name="missing_ok"]; - DropBehavior behavior = 3 [json_name="behavior"]; + string idxname = 1 [json_name="idxname"]; + RangeVar relation = 2 [json_name="relation"]; + string access_method = 3 [json_name="accessMethod"]; + string table_space = 4 [json_name="tableSpace"]; + repeated Node index_params = 5 [json_name="indexParams"]; + repeated Node index_including_params = 6 [json_name="indexIncludingParams"]; + repeated Node options = 7 [json_name="options"]; + Node where_clause = 8 [json_name="whereClause"]; + repeated Node exclude_op_names = 9 [json_name="excludeOpNames"]; + string idxcomment = 10 [json_name="idxcomment"]; + uint32 index_oid = 11 [json_name="indexOid"]; + uint32 old_number = 12 [json_name="oldNumber"]; + uint32 old_create_subid = 13 [json_name="oldCreateSubid"]; + uint32 old_first_relfilelocator_subid = 14 [json_name="oldFirstRelfilelocatorSubid"]; + bool unique = 15 [json_name="unique"]; + bool nulls_not_distinct = 16 [json_name="nulls_not_distinct"]; + bool primary = 17 [json_name="primary"]; + bool isconstraint = 18 [json_name="isconstraint"]; + bool deferrable = 19 [json_name="deferrable"]; + bool initdeferred = 20 [json_name="initdeferred"]; + bool transformed = 21 [json_name="transformed"]; + bool concurrent = 22 [json_name="concurrent"]; + bool if_not_exists = 23 [json_name="if_not_exists"]; + bool reset_default_tblspc = 24 [json_name="reset_default_tblspc"]; } message CreateStatsStmt @@ -1854,16 +2143,10 @@ message CreateStatsStmt bool if_not_exists = 7 [json_name="if_not_exists"]; } -message AlterCollationStmt -{ - repeated Node collname = 1 [json_name="collname"]; -} - -message CallStmt +message StatsElem { - FuncCall funccall = 1 [json_name="funccall"]; - FuncExpr funcexpr = 2 [json_name="funcexpr"]; - repeated Node outargs = 3 [json_name="outargs"]; + string name = 1 [json_name="name"]; + Node expr = 2 [json_name="expr"]; } message AlterStatsStmt @@ -1873,557 +2156,373 @@ message AlterStatsStmt bool missing_ok = 3 [json_name="missing_ok"]; } -message A_Expr -{ - A_Expr_Kind kind = 1 [json_name="kind"]; - repeated Node name = 2 [json_name="name"]; - Node lexpr = 3 [json_name="lexpr"]; - Node rexpr = 4 [json_name="rexpr"]; - int32 location = 5 [json_name="location"]; -} - -message ColumnRef -{ - repeated Node fields = 1 [json_name="fields"]; - int32 location = 2 [json_name="location"]; -} - -message ParamRef -{ - int32 number = 1 [json_name="number"]; - int32 location = 2 [json_name="location"]; -} - -message FuncCall +message CreateFunctionStmt { - repeated Node funcname = 1 [json_name="funcname"]; - repeated Node args = 2 [json_name="args"]; - repeated Node agg_order = 3 [json_name="agg_order"]; - Node agg_filter = 4 [json_name="agg_filter"]; - WindowDef over = 5 [json_name="over"]; - bool agg_within_group = 6 [json_name="agg_within_group"]; - bool agg_star = 7 [json_name="agg_star"]; - bool agg_distinct = 8 [json_name="agg_distinct"]; - bool func_variadic = 9 [json_name="func_variadic"]; - CoercionForm funcformat = 10 [json_name="funcformat"]; - int32 location = 11 [json_name="location"]; + bool is_procedure = 1 [json_name="is_procedure"]; + bool replace = 2 [json_name="replace"]; + repeated Node funcname = 3 [json_name="funcname"]; + repeated Node parameters = 4 [json_name="parameters"]; + TypeName return_type = 5 [json_name="returnType"]; + repeated Node options = 6 [json_name="options"]; + Node sql_body = 7 [json_name="sql_body"]; } -message A_Star +message FunctionParameter { + string name = 1 [json_name="name"]; + TypeName arg_type = 2 [json_name="argType"]; + FunctionParameterMode mode = 3 [json_name="mode"]; + Node defexpr = 4 [json_name="defexpr"]; } -message A_Indices +message AlterFunctionStmt { - bool is_slice = 1 [json_name="is_slice"]; - Node lidx = 2 [json_name="lidx"]; - Node uidx = 3 [json_name="uidx"]; + ObjectType objtype = 1 [json_name="objtype"]; + ObjectWithArgs func = 2 [json_name="func"]; + repeated Node actions = 3 [json_name="actions"]; } -message A_Indirection +message DoStmt { - Node arg = 1 [json_name="arg"]; - repeated Node indirection = 2 [json_name="indirection"]; + repeated Node args = 1 [json_name="args"]; } -message A_ArrayExpr +message InlineCodeBlock { - repeated Node elements = 1 [json_name="elements"]; - int32 location = 2 [json_name="location"]; + string source_text = 1 [json_name="source_text"]; + uint32 lang_oid = 2 [json_name="langOid"]; + bool lang_is_trusted = 3 [json_name="langIsTrusted"]; + bool atomic = 4 [json_name="atomic"]; } -message ResTarget +message CallStmt { - string name = 1 [json_name="name"]; - repeated Node indirection = 2 [json_name="indirection"]; - Node val = 3 [json_name="val"]; - int32 location = 4 [json_name="location"]; + FuncCall funccall = 1 [json_name="funccall"]; + FuncExpr funcexpr = 2 [json_name="funcexpr"]; + repeated Node outargs = 3 [json_name="outargs"]; } -message MultiAssignRef +message CallContext { - Node source = 1 [json_name="source"]; - int32 colno = 2 [json_name="colno"]; - int32 ncolumns = 3 [json_name="ncolumns"]; + bool atomic = 1 [json_name="atomic"]; } -message TypeCast +message RenameStmt { - Node arg = 1 [json_name="arg"]; - TypeName type_name = 2 [json_name="typeName"]; - int32 location = 3 [json_name="location"]; + ObjectType rename_type = 1 [json_name="renameType"]; + ObjectType relation_type = 2 [json_name="relationType"]; + RangeVar relation = 3 [json_name="relation"]; + Node object = 4 [json_name="object"]; + string subname = 5 [json_name="subname"]; + string newname = 6 [json_name="newname"]; + DropBehavior behavior = 7 [json_name="behavior"]; + bool missing_ok = 8 [json_name="missing_ok"]; } -message CollateClause +message AlterObjectDependsStmt { - Node arg = 1 [json_name="arg"]; - repeated Node collname = 2 [json_name="collname"]; - int32 location = 3 [json_name="location"]; + ObjectType object_type = 1 [json_name="objectType"]; + RangeVar relation = 2 [json_name="relation"]; + Node object = 3 [json_name="object"]; + String extname = 4 [json_name="extname"]; + bool remove = 5 [json_name="remove"]; } -message SortBy +message AlterObjectSchemaStmt { - Node node = 1 [json_name="node"]; - SortByDir sortby_dir = 2 [json_name="sortby_dir"]; - SortByNulls sortby_nulls = 3 [json_name="sortby_nulls"]; - repeated Node use_op = 4 [json_name="useOp"]; - int32 location = 5 [json_name="location"]; + ObjectType object_type = 1 [json_name="objectType"]; + RangeVar relation = 2 [json_name="relation"]; + Node object = 3 [json_name="object"]; + string newschema = 4 [json_name="newschema"]; + bool missing_ok = 5 [json_name="missing_ok"]; } -message WindowDef +message AlterOwnerStmt { - string name = 1 [json_name="name"]; - string refname = 2 [json_name="refname"]; - repeated Node partition_clause = 3 [json_name="partitionClause"]; - repeated Node order_clause = 4 [json_name="orderClause"]; - int32 frame_options = 5 [json_name="frameOptions"]; - Node start_offset = 6 [json_name="startOffset"]; - Node end_offset = 7 [json_name="endOffset"]; - int32 location = 8 [json_name="location"]; + ObjectType object_type = 1 [json_name="objectType"]; + RangeVar relation = 2 [json_name="relation"]; + Node object = 3 [json_name="object"]; + RoleSpec newowner = 4 [json_name="newowner"]; } -message RangeSubselect +message AlterOperatorStmt { - bool lateral = 1 [json_name="lateral"]; - Node subquery = 2 [json_name="subquery"]; - Alias alias = 3 [json_name="alias"]; + ObjectWithArgs opername = 1 [json_name="opername"]; + repeated Node options = 2 [json_name="options"]; } -message RangeFunction +message AlterTypeStmt { - bool lateral = 1 [json_name="lateral"]; - bool ordinality = 2 [json_name="ordinality"]; - bool is_rowsfrom = 3 [json_name="is_rowsfrom"]; - repeated Node functions = 4 [json_name="functions"]; - Alias alias = 5 [json_name="alias"]; - repeated Node coldeflist = 6 [json_name="coldeflist"]; + repeated Node type_name = 1 [json_name="typeName"]; + repeated Node options = 2 [json_name="options"]; } -message RangeTableSample +message RuleStmt { - Node relation = 1 [json_name="relation"]; - repeated Node method = 2 [json_name="method"]; - repeated Node args = 3 [json_name="args"]; - Node repeatable = 4 [json_name="repeatable"]; - int32 location = 5 [json_name="location"]; + RangeVar relation = 1 [json_name="relation"]; + string rulename = 2 [json_name="rulename"]; + Node where_clause = 3 [json_name="whereClause"]; + CmdType event = 4 [json_name="event"]; + bool instead = 5 [json_name="instead"]; + repeated Node actions = 6 [json_name="actions"]; + bool replace = 7 [json_name="replace"]; } -message RangeTableFunc +message NotifyStmt { - bool lateral = 1 [json_name="lateral"]; - Node docexpr = 2 [json_name="docexpr"]; - Node rowexpr = 3 [json_name="rowexpr"]; - repeated Node namespaces = 4 [json_name="namespaces"]; - repeated Node columns = 5 [json_name="columns"]; - Alias alias = 6 [json_name="alias"]; - int32 location = 7 [json_name="location"]; + string conditionname = 1 [json_name="conditionname"]; + string payload = 2 [json_name="payload"]; } -message RangeTableFuncCol +message ListenStmt { - string colname = 1 [json_name="colname"]; - TypeName type_name = 2 [json_name="typeName"]; - bool for_ordinality = 3 [json_name="for_ordinality"]; - bool is_not_null = 4 [json_name="is_not_null"]; - Node colexpr = 5 [json_name="colexpr"]; - Node coldefexpr = 6 [json_name="coldefexpr"]; - int32 location = 7 [json_name="location"]; + string conditionname = 1 [json_name="conditionname"]; } -message TypeName +message UnlistenStmt { - repeated Node names = 1 [json_name="names"]; - uint32 type_oid = 2 [json_name="typeOid"]; - bool setof = 3 [json_name="setof"]; - bool pct_type = 4 [json_name="pct_type"]; - repeated Node typmods = 5 [json_name="typmods"]; - int32 typemod = 6 [json_name="typemod"]; - repeated Node array_bounds = 7 [json_name="arrayBounds"]; - int32 location = 8 [json_name="location"]; + string conditionname = 1 [json_name="conditionname"]; } -message ColumnDef +message TransactionStmt { - string colname = 1 [json_name="colname"]; - TypeName type_name = 2 [json_name="typeName"]; - string compression = 3 [json_name="compression"]; - int32 inhcount = 4 [json_name="inhcount"]; - bool is_local = 5 [json_name="is_local"]; - bool is_not_null = 6 [json_name="is_not_null"]; - bool is_from_type = 7 [json_name="is_from_type"]; - string storage = 8 [json_name="storage"]; - Node raw_default = 9 [json_name="raw_default"]; - Node cooked_default = 10 [json_name="cooked_default"]; - string identity = 11 [json_name="identity"]; - RangeVar identity_sequence = 12 [json_name="identitySequence"]; - string generated = 13 [json_name="generated"]; - CollateClause coll_clause = 14 [json_name="collClause"]; - uint32 coll_oid = 15 [json_name="collOid"]; - repeated Node constraints = 16 [json_name="constraints"]; - repeated Node fdwoptions = 17 [json_name="fdwoptions"]; - int32 location = 18 [json_name="location"]; + TransactionStmtKind kind = 1 [json_name="kind"]; + repeated Node options = 2 [json_name="options"]; + string savepoint_name = 3 [json_name="savepoint_name"]; + string gid = 4 [json_name="gid"]; + bool chain = 5 [json_name="chain"]; } -message IndexElem +message CompositeTypeStmt { - string name = 1 [json_name="name"]; - Node expr = 2 [json_name="expr"]; - string indexcolname = 3 [json_name="indexcolname"]; - repeated Node collation = 4 [json_name="collation"]; - repeated Node opclass = 5 [json_name="opclass"]; - repeated Node opclassopts = 6 [json_name="opclassopts"]; - SortByDir ordering = 7 [json_name="ordering"]; - SortByNulls nulls_ordering = 8 [json_name="nulls_ordering"]; + RangeVar typevar = 1 [json_name="typevar"]; + repeated Node coldeflist = 2 [json_name="coldeflist"]; } -message StatsElem +message CreateEnumStmt { - string name = 1 [json_name="name"]; - Node expr = 2 [json_name="expr"]; + repeated Node type_name = 1 [json_name="typeName"]; + repeated Node vals = 2 [json_name="vals"]; } -message Constraint +message CreateRangeStmt { - ConstrType contype = 1 [json_name="contype"]; - string conname = 2 [json_name="conname"]; - bool deferrable = 3 [json_name="deferrable"]; - bool initdeferred = 4 [json_name="initdeferred"]; - int32 location = 5 [json_name="location"]; - bool is_no_inherit = 6 [json_name="is_no_inherit"]; - Node raw_expr = 7 [json_name="raw_expr"]; - string cooked_expr = 8 [json_name="cooked_expr"]; - string generated_when = 9 [json_name="generated_when"]; - bool nulls_not_distinct = 10 [json_name="nulls_not_distinct"]; - repeated Node keys = 11 [json_name="keys"]; - repeated Node including = 12 [json_name="including"]; - repeated Node exclusions = 13 [json_name="exclusions"]; - repeated Node options = 14 [json_name="options"]; - string indexname = 15 [json_name="indexname"]; - string indexspace = 16 [json_name="indexspace"]; - bool reset_default_tblspc = 17 [json_name="reset_default_tblspc"]; - string access_method = 18 [json_name="access_method"]; - Node where_clause = 19 [json_name="where_clause"]; - RangeVar pktable = 20 [json_name="pktable"]; - repeated Node fk_attrs = 21 [json_name="fk_attrs"]; - repeated Node pk_attrs = 22 [json_name="pk_attrs"]; - string fk_matchtype = 23 [json_name="fk_matchtype"]; - string fk_upd_action = 24 [json_name="fk_upd_action"]; - string fk_del_action = 25 [json_name="fk_del_action"]; - repeated Node fk_del_set_cols = 26 [json_name="fk_del_set_cols"]; - repeated Node old_conpfeqop = 27 [json_name="old_conpfeqop"]; - uint32 old_pktable_oid = 28 [json_name="old_pktable_oid"]; - bool skip_validation = 29 [json_name="skip_validation"]; - bool initially_valid = 30 [json_name="initially_valid"]; + repeated Node type_name = 1 [json_name="typeName"]; + repeated Node params = 2 [json_name="params"]; } -message DefElem +message AlterEnumStmt { - string defnamespace = 1 [json_name="defnamespace"]; - string defname = 2 [json_name="defname"]; - Node arg = 3 [json_name="arg"]; - DefElemAction defaction = 4 [json_name="defaction"]; - int32 location = 5 [json_name="location"]; + repeated Node type_name = 1 [json_name="typeName"]; + string old_val = 2 [json_name="oldVal"]; + string new_val = 3 [json_name="newVal"]; + string new_val_neighbor = 4 [json_name="newValNeighbor"]; + bool new_val_is_after = 5 [json_name="newValIsAfter"]; + bool skip_if_new_val_exists = 6 [json_name="skipIfNewValExists"]; } -message RangeTblEntry +message ViewStmt { - RTEKind rtekind = 1 [json_name="rtekind"]; - uint32 relid = 2 [json_name="relid"]; - string relkind = 3 [json_name="relkind"]; - int32 rellockmode = 4 [json_name="rellockmode"]; - TableSampleClause tablesample = 5 [json_name="tablesample"]; - Query subquery = 6 [json_name="subquery"]; - bool security_barrier = 7 [json_name="security_barrier"]; - JoinType jointype = 8 [json_name="jointype"]; - int32 joinmergedcols = 9 [json_name="joinmergedcols"]; - repeated Node joinaliasvars = 10 [json_name="joinaliasvars"]; - repeated Node joinleftcols = 11 [json_name="joinleftcols"]; - repeated Node joinrightcols = 12 [json_name="joinrightcols"]; - Alias join_using_alias = 13 [json_name="join_using_alias"]; - repeated Node functions = 14 [json_name="functions"]; - bool funcordinality = 15 [json_name="funcordinality"]; - TableFunc tablefunc = 16 [json_name="tablefunc"]; - repeated Node values_lists = 17 [json_name="values_lists"]; - string ctename = 18 [json_name="ctename"]; - uint32 ctelevelsup = 19 [json_name="ctelevelsup"]; - bool self_reference = 20 [json_name="self_reference"]; - repeated Node coltypes = 21 [json_name="coltypes"]; - repeated Node coltypmods = 22 [json_name="coltypmods"]; - repeated Node colcollations = 23 [json_name="colcollations"]; - string enrname = 24 [json_name="enrname"]; - double enrtuples = 25 [json_name="enrtuples"]; - Alias alias = 26 [json_name="alias"]; - Alias eref = 27 [json_name="eref"]; - bool lateral = 28 [json_name="lateral"]; - bool inh = 29 [json_name="inh"]; - bool in_from_cl = 30 [json_name="inFromCl"]; - uint32 required_perms = 31 [json_name="requiredPerms"]; - uint32 check_as_user = 32 [json_name="checkAsUser"]; - repeated uint64 selected_cols = 33 [json_name="selectedCols"]; - repeated uint64 inserted_cols = 34 [json_name="insertedCols"]; - repeated uint64 updated_cols = 35 [json_name="updatedCols"]; - repeated uint64 extra_updated_cols = 36 [json_name="extraUpdatedCols"]; - repeated Node security_quals = 37 [json_name="securityQuals"]; + RangeVar view = 1 [json_name="view"]; + repeated Node aliases = 2 [json_name="aliases"]; + Node query = 3 [json_name="query"]; + bool replace = 4 [json_name="replace"]; + repeated Node options = 5 [json_name="options"]; + ViewCheckOption with_check_option = 6 [json_name="withCheckOption"]; } -message RangeTblFunction +message LoadStmt { - Node funcexpr = 1 [json_name="funcexpr"]; - int32 funccolcount = 2 [json_name="funccolcount"]; - repeated Node funccolnames = 3 [json_name="funccolnames"]; - repeated Node funccoltypes = 4 [json_name="funccoltypes"]; - repeated Node funccoltypmods = 5 [json_name="funccoltypmods"]; - repeated Node funccolcollations = 6 [json_name="funccolcollations"]; - repeated uint64 funcparams = 7 [json_name="funcparams"]; + string filename = 1 [json_name="filename"]; } -message TableSampleClause +message CreatedbStmt { - uint32 tsmhandler = 1 [json_name="tsmhandler"]; - repeated Node args = 2 [json_name="args"]; - Node repeatable = 3 [json_name="repeatable"]; + string dbname = 1 [json_name="dbname"]; + repeated Node options = 2 [json_name="options"]; } -message WithCheckOption +message AlterDatabaseStmt { - WCOKind kind = 1 [json_name="kind"]; - string relname = 2 [json_name="relname"]; - string polname = 3 [json_name="polname"]; - Node qual = 4 [json_name="qual"]; - bool cascaded = 5 [json_name="cascaded"]; + string dbname = 1 [json_name="dbname"]; + repeated Node options = 2 [json_name="options"]; } -message SortGroupClause +message AlterDatabaseRefreshCollStmt { - uint32 tle_sort_group_ref = 1 [json_name="tleSortGroupRef"]; - uint32 eqop = 2 [json_name="eqop"]; - uint32 sortop = 3 [json_name="sortop"]; - bool nulls_first = 4 [json_name="nulls_first"]; - bool hashable = 5 [json_name="hashable"]; + string dbname = 1 [json_name="dbname"]; } -message GroupingSet +message AlterDatabaseSetStmt { - GroupingSetKind kind = 1 [json_name="kind"]; - repeated Node content = 2 [json_name="content"]; - int32 location = 3 [json_name="location"]; + string dbname = 1 [json_name="dbname"]; + VariableSetStmt setstmt = 2 [json_name="setstmt"]; } -message WindowClause +message DropdbStmt { - string name = 1 [json_name="name"]; - string refname = 2 [json_name="refname"]; - repeated Node partition_clause = 3 [json_name="partitionClause"]; - repeated Node order_clause = 4 [json_name="orderClause"]; - int32 frame_options = 5 [json_name="frameOptions"]; - Node start_offset = 6 [json_name="startOffset"]; - Node end_offset = 7 [json_name="endOffset"]; - repeated Node run_condition = 8 [json_name="runCondition"]; - uint32 start_in_range_func = 9 [json_name="startInRangeFunc"]; - uint32 end_in_range_func = 10 [json_name="endInRangeFunc"]; - uint32 in_range_coll = 11 [json_name="inRangeColl"]; - bool in_range_asc = 12 [json_name="inRangeAsc"]; - bool in_range_nulls_first = 13 [json_name="inRangeNullsFirst"]; - uint32 winref = 14 [json_name="winref"]; - bool copied_order = 15 [json_name="copiedOrder"]; + string dbname = 1 [json_name="dbname"]; + bool missing_ok = 2 [json_name="missing_ok"]; + repeated Node options = 3 [json_name="options"]; } -message ObjectWithArgs +message AlterSystemStmt { - repeated Node objname = 1 [json_name="objname"]; - repeated Node objargs = 2 [json_name="objargs"]; - repeated Node objfuncargs = 3 [json_name="objfuncargs"]; - bool args_unspecified = 4 [json_name="args_unspecified"]; + VariableSetStmt setstmt = 1 [json_name="setstmt"]; } -message AccessPriv +message ClusterStmt { - string priv_name = 1 [json_name="priv_name"]; - repeated Node cols = 2 [json_name="cols"]; + RangeVar relation = 1 [json_name="relation"]; + string indexname = 2 [json_name="indexname"]; + repeated Node params = 3 [json_name="params"]; } -message CreateOpClassItem +message VacuumStmt { - int32 itemtype = 1 [json_name="itemtype"]; - ObjectWithArgs name = 2 [json_name="name"]; - int32 number = 3 [json_name="number"]; - repeated Node order_family = 4 [json_name="order_family"]; - repeated Node class_args = 5 [json_name="class_args"]; - TypeName storedtype = 6 [json_name="storedtype"]; + repeated Node options = 1 [json_name="options"]; + repeated Node rels = 2 [json_name="rels"]; + bool is_vacuumcmd = 3 [json_name="is_vacuumcmd"]; } -message TableLikeClause +message VacuumRelation { RangeVar relation = 1 [json_name="relation"]; - uint32 options = 2 [json_name="options"]; - uint32 relation_oid = 3 [json_name="relationOid"]; + uint32 oid = 2 [json_name="oid"]; + repeated Node va_cols = 3 [json_name="va_cols"]; } -message FunctionParameter +message ExplainStmt { - string name = 1 [json_name="name"]; - TypeName arg_type = 2 [json_name="argType"]; - FunctionParameterMode mode = 3 [json_name="mode"]; - Node defexpr = 4 [json_name="defexpr"]; + Node query = 1 [json_name="query"]; + repeated Node options = 2 [json_name="options"]; } -message LockingClause +message CreateTableAsStmt { - repeated Node locked_rels = 1 [json_name="lockedRels"]; - LockClauseStrength strength = 2 [json_name="strength"]; - LockWaitPolicy wait_policy = 3 [json_name="waitPolicy"]; + Node query = 1 [json_name="query"]; + IntoClause into = 2 [json_name="into"]; + ObjectType objtype = 3 [json_name="objtype"]; + bool is_select_into = 4 [json_name="is_select_into"]; + bool if_not_exists = 5 [json_name="if_not_exists"]; } -message RowMarkClause +message RefreshMatViewStmt { - uint32 rti = 1 [json_name="rti"]; - LockClauseStrength strength = 2 [json_name="strength"]; - LockWaitPolicy wait_policy = 3 [json_name="waitPolicy"]; - bool pushed_down = 4 [json_name="pushedDown"]; + bool concurrent = 1 [json_name="concurrent"]; + bool skip_data = 2 [json_name="skipData"]; + RangeVar relation = 3 [json_name="relation"]; } -message XmlSerialize +message CheckPointStmt { - XmlOptionType xmloption = 1 [json_name="xmloption"]; - Node expr = 2 [json_name="expr"]; - TypeName type_name = 3 [json_name="typeName"]; - int32 location = 4 [json_name="location"]; } -message WithClause +message DiscardStmt { - repeated Node ctes = 1 [json_name="ctes"]; - bool recursive = 2 [json_name="recursive"]; - int32 location = 3 [json_name="location"]; + DiscardMode target = 1 [json_name="target"]; } -message InferClause +message LockStmt { - repeated Node index_elems = 1 [json_name="indexElems"]; - Node where_clause = 2 [json_name="whereClause"]; - string conname = 3 [json_name="conname"]; - int32 location = 4 [json_name="location"]; + repeated Node relations = 1 [json_name="relations"]; + int32 mode = 2 [json_name="mode"]; + bool nowait = 3 [json_name="nowait"]; } -message OnConflictClause +message ConstraintsSetStmt { - OnConflictAction action = 1 [json_name="action"]; - InferClause infer = 2 [json_name="infer"]; - repeated Node target_list = 3 [json_name="targetList"]; - Node where_clause = 4 [json_name="whereClause"]; - int32 location = 5 [json_name="location"]; + repeated Node constraints = 1 [json_name="constraints"]; + bool deferred = 2 [json_name="deferred"]; } -message CTESearchClause +message ReindexStmt { - repeated Node search_col_list = 1 [json_name="search_col_list"]; - bool search_breadth_first = 2 [json_name="search_breadth_first"]; - string search_seq_column = 3 [json_name="search_seq_column"]; - int32 location = 4 [json_name="location"]; + ReindexObjectType kind = 1 [json_name="kind"]; + RangeVar relation = 2 [json_name="relation"]; + string name = 3 [json_name="name"]; + repeated Node params = 4 [json_name="params"]; } -message CTECycleClause +message CreateConversionStmt { - repeated Node cycle_col_list = 1 [json_name="cycle_col_list"]; - string cycle_mark_column = 2 [json_name="cycle_mark_column"]; - Node cycle_mark_value = 3 [json_name="cycle_mark_value"]; - Node cycle_mark_default = 4 [json_name="cycle_mark_default"]; - string cycle_path_column = 5 [json_name="cycle_path_column"]; - int32 location = 6 [json_name="location"]; - uint32 cycle_mark_type = 7 [json_name="cycle_mark_type"]; - int32 cycle_mark_typmod = 8 [json_name="cycle_mark_typmod"]; - uint32 cycle_mark_collation = 9 [json_name="cycle_mark_collation"]; - uint32 cycle_mark_neop = 10 [json_name="cycle_mark_neop"]; + repeated Node conversion_name = 1 [json_name="conversion_name"]; + string for_encoding_name = 2 [json_name="for_encoding_name"]; + string to_encoding_name = 3 [json_name="to_encoding_name"]; + repeated Node func_name = 4 [json_name="func_name"]; + bool def = 5 [json_name="def"]; } -message CommonTableExpr +message CreateCastStmt { - string ctename = 1 [json_name="ctename"]; - repeated Node aliascolnames = 2 [json_name="aliascolnames"]; - CTEMaterialize ctematerialized = 3 [json_name="ctematerialized"]; - Node ctequery = 4 [json_name="ctequery"]; - CTESearchClause search_clause = 5 [json_name="search_clause"]; - CTECycleClause cycle_clause = 6 [json_name="cycle_clause"]; - int32 location = 7 [json_name="location"]; - bool cterecursive = 8 [json_name="cterecursive"]; - int32 cterefcount = 9 [json_name="cterefcount"]; - repeated Node ctecolnames = 10 [json_name="ctecolnames"]; - repeated Node ctecoltypes = 11 [json_name="ctecoltypes"]; - repeated Node ctecoltypmods = 12 [json_name="ctecoltypmods"]; - repeated Node ctecolcollations = 13 [json_name="ctecolcollations"]; + TypeName sourcetype = 1 [json_name="sourcetype"]; + TypeName targettype = 2 [json_name="targettype"]; + ObjectWithArgs func = 3 [json_name="func"]; + CoercionContext context = 4 [json_name="context"]; + bool inout = 5 [json_name="inout"]; } -message MergeWhenClause +message CreateTransformStmt { - bool matched = 1 [json_name="matched"]; - CmdType command_type = 2 [json_name="commandType"]; - OverridingKind override = 3 [json_name="override"]; - Node condition = 4 [json_name="condition"]; - repeated Node target_list = 5 [json_name="targetList"]; - repeated Node values = 6 [json_name="values"]; + bool replace = 1 [json_name="replace"]; + TypeName type_name = 2 [json_name="type_name"]; + string lang = 3 [json_name="lang"]; + ObjectWithArgs fromsql = 4 [json_name="fromsql"]; + ObjectWithArgs tosql = 5 [json_name="tosql"]; } -message RoleSpec +message PrepareStmt { - RoleSpecType roletype = 1 [json_name="roletype"]; - string rolename = 2 [json_name="rolename"]; - int32 location = 3 [json_name="location"]; + string name = 1 [json_name="name"]; + repeated Node argtypes = 2 [json_name="argtypes"]; + Node query = 3 [json_name="query"]; } -message TriggerTransition +message ExecuteStmt { string name = 1 [json_name="name"]; - bool is_new = 2 [json_name="isNew"]; - bool is_table = 3 [json_name="isTable"]; + repeated Node params = 2 [json_name="params"]; } -message PartitionElem +message DeallocateStmt { string name = 1 [json_name="name"]; - Node expr = 2 [json_name="expr"]; - repeated Node collation = 3 [json_name="collation"]; - repeated Node opclass = 4 [json_name="opclass"]; - int32 location = 5 [json_name="location"]; } -message PartitionSpec +message DropOwnedStmt { - string strategy = 1 [json_name="strategy"]; - repeated Node part_params = 2 [json_name="partParams"]; - int32 location = 3 [json_name="location"]; + repeated Node roles = 1 [json_name="roles"]; + DropBehavior behavior = 2 [json_name="behavior"]; } -message PartitionBoundSpec +message ReassignOwnedStmt { - string strategy = 1 [json_name="strategy"]; - bool is_default = 2 [json_name="is_default"]; - int32 modulus = 3 [json_name="modulus"]; - int32 remainder = 4 [json_name="remainder"]; - repeated Node listdatums = 5 [json_name="listdatums"]; - repeated Node lowerdatums = 6 [json_name="lowerdatums"]; - repeated Node upperdatums = 7 [json_name="upperdatums"]; - int32 location = 8 [json_name="location"]; + repeated Node roles = 1 [json_name="roles"]; + RoleSpec newrole = 2 [json_name="newrole"]; } -message PartitionRangeDatum +message AlterTSDictionaryStmt { - PartitionRangeDatumKind kind = 1 [json_name="kind"]; - Node value = 2 [json_name="value"]; - int32 location = 3 [json_name="location"]; + repeated Node dictname = 1 [json_name="dictname"]; + repeated Node options = 2 [json_name="options"]; } -message PartitionCmd +message AlterTSConfigurationStmt { - RangeVar name = 1 [json_name="name"]; - PartitionBoundSpec bound = 2 [json_name="bound"]; - bool concurrent = 3 [json_name="concurrent"]; + AlterTSConfigType kind = 1 [json_name="kind"]; + repeated Node cfgname = 2 [json_name="cfgname"]; + repeated Node tokentype = 3 [json_name="tokentype"]; + repeated Node dicts = 4 [json_name="dicts"]; + bool override = 5 [json_name="override"]; + bool replace = 6 [json_name="replace"]; + bool missing_ok = 7 [json_name="missing_ok"]; } -message VacuumRelation +message PublicationTable { RangeVar relation = 1 [json_name="relation"]; - uint32 oid = 2 [json_name="oid"]; - repeated Node va_cols = 3 [json_name="va_cols"]; + Node where_clause = 2 [json_name="whereClause"]; + repeated Node columns = 3 [json_name="columns"]; } message PublicationObjSpec @@ -2434,24 +2533,45 @@ message PublicationObjSpec int32 location = 4 [json_name="location"]; } -message PublicationTable +message CreatePublicationStmt { - RangeVar relation = 1 [json_name="relation"]; - Node where_clause = 2 [json_name="whereClause"]; - repeated Node columns = 3 [json_name="columns"]; + string pubname = 1 [json_name="pubname"]; + repeated Node options = 2 [json_name="options"]; + repeated Node pubobjects = 3 [json_name="pubobjects"]; + bool for_all_tables = 4 [json_name="for_all_tables"]; } -message InlineCodeBlock +message AlterPublicationStmt { - string source_text = 1 [json_name="source_text"]; - uint32 lang_oid = 2 [json_name="langOid"]; - bool lang_is_trusted = 3 [json_name="langIsTrusted"]; - bool atomic = 4 [json_name="atomic"]; + string pubname = 1 [json_name="pubname"]; + repeated Node options = 2 [json_name="options"]; + repeated Node pubobjects = 3 [json_name="pubobjects"]; + bool for_all_tables = 4 [json_name="for_all_tables"]; + AlterPublicationAction action = 5 [json_name="action"]; } -message CallContext +message CreateSubscriptionStmt { - bool atomic = 1 [json_name="atomic"]; + string subname = 1 [json_name="subname"]; + string conninfo = 2 [json_name="conninfo"]; + repeated Node publication = 3 [json_name="publication"]; + repeated Node options = 4 [json_name="options"]; +} + +message AlterSubscriptionStmt +{ + AlterSubscriptionType kind = 1 [json_name="kind"]; + string subname = 2 [json_name="subname"]; + string conninfo = 3 [json_name="conninfo"]; + repeated Node publication = 4 [json_name="publication"]; + repeated Node options = 5 [json_name="options"]; +} + +message DropSubscriptionStmt +{ + string subname = 1 [json_name="subname"]; + bool missing_ok = 2 [json_name="missing_ok"]; + DropBehavior behavior = 3 [json_name="behavior"]; } enum OverridingKind @@ -2550,6 +2670,14 @@ enum DefElemAction DEFELEM_DROP = 4; } +enum PartitionStrategy +{ + PARTITION_STRATEGY_UNDEFINED = 0; + PARTITION_STRATEGY_LIST = 1; + PARTITION_STRATEGY_RANGE = 2; + PARTITION_STRATEGY_HASH = 3; +} + enum PartitionRangeDatumKind { PARTITION_RANGE_DATUM_KIND_UNDEFINED = 0; @@ -2678,76 +2806,71 @@ enum AlterTableType { ALTER_TABLE_TYPE_UNDEFINED = 0; AT_AddColumn = 1; - AT_AddColumnRecurse = 2; - AT_AddColumnToView = 3; - AT_ColumnDefault = 4; - AT_CookedColumnDefault = 5; - AT_DropNotNull = 6; - AT_SetNotNull = 7; - AT_DropExpression = 8; - AT_CheckNotNull = 9; - AT_SetStatistics = 10; - AT_SetOptions = 11; - AT_ResetOptions = 12; - AT_SetStorage = 13; - AT_SetCompression = 14; - AT_DropColumn = 15; - AT_DropColumnRecurse = 16; - AT_AddIndex = 17; - AT_ReAddIndex = 18; - AT_AddConstraint = 19; - AT_AddConstraintRecurse = 20; - AT_ReAddConstraint = 21; - AT_ReAddDomainConstraint = 22; - AT_AlterConstraint = 23; - AT_ValidateConstraint = 24; - AT_ValidateConstraintRecurse = 25; - AT_AddIndexConstraint = 26; - AT_DropConstraint = 27; - AT_DropConstraintRecurse = 28; - AT_ReAddComment = 29; - AT_AlterColumnType = 30; - AT_AlterColumnGenericOptions = 31; - AT_ChangeOwner = 32; - AT_ClusterOn = 33; - AT_DropCluster = 34; - AT_SetLogged = 35; - AT_SetUnLogged = 36; - AT_DropOids = 37; - AT_SetAccessMethod = 38; - AT_SetTableSpace = 39; - AT_SetRelOptions = 40; - AT_ResetRelOptions = 41; - AT_ReplaceRelOptions = 42; - AT_EnableTrig = 43; - AT_EnableAlwaysTrig = 44; - AT_EnableReplicaTrig = 45; - AT_DisableTrig = 46; - AT_EnableTrigAll = 47; - AT_DisableTrigAll = 48; - AT_EnableTrigUser = 49; - AT_DisableTrigUser = 50; - AT_EnableRule = 51; - AT_EnableAlwaysRule = 52; - AT_EnableReplicaRule = 53; - AT_DisableRule = 54; - AT_AddInherit = 55; - AT_DropInherit = 56; - AT_AddOf = 57; - AT_DropOf = 58; - AT_ReplicaIdentity = 59; - AT_EnableRowSecurity = 60; - AT_DisableRowSecurity = 61; - AT_ForceRowSecurity = 62; - AT_NoForceRowSecurity = 63; - AT_GenericOptions = 64; - AT_AttachPartition = 65; - AT_DetachPartition = 66; - AT_DetachPartitionFinalize = 67; - AT_AddIdentity = 68; - AT_SetIdentity = 69; - AT_DropIdentity = 70; - AT_ReAddStatistics = 71; + AT_AddColumnToView = 2; + AT_ColumnDefault = 3; + AT_CookedColumnDefault = 4; + AT_DropNotNull = 5; + AT_SetNotNull = 6; + AT_DropExpression = 7; + AT_CheckNotNull = 8; + AT_SetStatistics = 9; + AT_SetOptions = 10; + AT_ResetOptions = 11; + AT_SetStorage = 12; + AT_SetCompression = 13; + AT_DropColumn = 14; + AT_AddIndex = 15; + AT_ReAddIndex = 16; + AT_AddConstraint = 17; + AT_ReAddConstraint = 18; + AT_ReAddDomainConstraint = 19; + AT_AlterConstraint = 20; + AT_ValidateConstraint = 21; + AT_AddIndexConstraint = 22; + AT_DropConstraint = 23; + AT_ReAddComment = 24; + AT_AlterColumnType = 25; + AT_AlterColumnGenericOptions = 26; + AT_ChangeOwner = 27; + AT_ClusterOn = 28; + AT_DropCluster = 29; + AT_SetLogged = 30; + AT_SetUnLogged = 31; + AT_DropOids = 32; + AT_SetAccessMethod = 33; + AT_SetTableSpace = 34; + AT_SetRelOptions = 35; + AT_ResetRelOptions = 36; + AT_ReplaceRelOptions = 37; + AT_EnableTrig = 38; + AT_EnableAlwaysTrig = 39; + AT_EnableReplicaTrig = 40; + AT_DisableTrig = 41; + AT_EnableTrigAll = 42; + AT_DisableTrigAll = 43; + AT_EnableTrigUser = 44; + AT_DisableTrigUser = 45; + AT_EnableRule = 46; + AT_EnableAlwaysRule = 47; + AT_EnableReplicaRule = 48; + AT_DisableRule = 49; + AT_AddInherit = 50; + AT_DropInherit = 51; + AT_AddOf = 52; + AT_DropOf = 53; + AT_ReplicaIdentity = 54; + AT_EnableRowSecurity = 55; + AT_DisableRowSecurity = 56; + AT_ForceRowSecurity = 57; + AT_NoForceRowSecurity = 58; + AT_GenericOptions = 59; + AT_AttachPartition = 60; + AT_DetachPartition = 61; + AT_DetachPartitionFinalize = 62; + AT_AddIdentity = 63; + AT_SetIdentity = 64; + AT_DropIdentity = 65; + AT_ReAddStatistics = 66; } enum GrantTargetType @@ -3021,6 +3144,41 @@ enum XmlOptionType XMLOPTION_CONTENT = 2; } +enum JsonEncoding +{ + JSON_ENCODING_UNDEFINED = 0; + JS_ENC_DEFAULT = 1; + JS_ENC_UTF8 = 2; + JS_ENC_UTF16 = 3; + JS_ENC_UTF32 = 4; +} + +enum JsonFormatType +{ + JSON_FORMAT_TYPE_UNDEFINED = 0; + JS_FORMAT_DEFAULT = 1; + JS_FORMAT_JSON = 2; + JS_FORMAT_JSONB = 3; +} + +enum JsonConstructorType +{ + JSON_CONSTRUCTOR_TYPE_UNDEFINED = 0; + JSCTOR_JSON_OBJECT = 1; + JSCTOR_JSON_ARRAY = 2; + JSCTOR_JSON_OBJECTAGG = 3; + JSCTOR_JSON_ARRAYAGG = 4; +} + +enum JsonValueType +{ + JSON_VALUE_TYPE_UNDEFINED = 0; + JS_TYPE_ANY = 1; + JS_TYPE_OBJECT = 2; + JS_TYPE_ARRAY = 3; + JS_TYPE_SCALAR = 4; +} + enum NullTestType { NULL_TEST_TYPE_UNDEFINED = 0; @@ -3061,8 +3219,9 @@ enum JoinType JOIN_RIGHT = 4; JOIN_SEMI = 5; JOIN_ANTI = 6; - JOIN_UNIQUE_OUTER = 7; - JOIN_UNIQUE_INNER = 8; + JOIN_RIGHT_ANTI = 7; + JOIN_UNIQUE_OUTER = 8; + JOIN_UNIQUE_INNER = 9; } enum AggStrategy @@ -3202,472 +3361,485 @@ enum Token { SQL_COMMENT = 275; C_COMMENT = 276; ABORT_P = 277; - ABSOLUTE_P = 278; - ACCESS = 279; - ACTION = 280; - ADD_P = 281; - ADMIN = 282; - AFTER = 283; - AGGREGATE = 284; - ALL = 285; - ALSO = 286; - ALTER = 287; - ALWAYS = 288; - ANALYSE = 289; - ANALYZE = 290; - AND = 291; - ANY = 292; - ARRAY = 293; - AS = 294; - ASC = 295; - ASENSITIVE = 296; - ASSERTION = 297; - ASSIGNMENT = 298; - ASYMMETRIC = 299; - ATOMIC = 300; - AT = 301; - ATTACH = 302; - ATTRIBUTE = 303; - AUTHORIZATION = 304; - BACKWARD = 305; - BEFORE = 306; - BEGIN_P = 307; - BETWEEN = 308; - BIGINT = 309; - BINARY = 310; - BIT = 311; - BOOLEAN_P = 312; - BOTH = 313; - BREADTH = 314; - BY = 315; - CACHE = 316; - CALL = 317; - CALLED = 318; - CASCADE = 319; - CASCADED = 320; - CASE = 321; - CAST = 322; - CATALOG_P = 323; - CHAIN = 324; - CHAR_P = 325; - CHARACTER = 326; - CHARACTERISTICS = 327; - CHECK = 328; - CHECKPOINT = 329; - CLASS = 330; - CLOSE = 331; - CLUSTER = 332; - COALESCE = 333; - COLLATE = 334; - COLLATION = 335; - COLUMN = 336; - COLUMNS = 337; - COMMENT = 338; - COMMENTS = 339; - COMMIT = 340; - COMMITTED = 341; - COMPRESSION = 342; - CONCURRENTLY = 343; - CONFIGURATION = 344; - CONFLICT = 345; - CONNECTION = 346; - CONSTRAINT = 347; - CONSTRAINTS = 348; - CONTENT_P = 349; - CONTINUE_P = 350; - CONVERSION_P = 351; - COPY = 352; - COST = 353; - CREATE = 354; - CROSS = 355; - CSV = 356; - CUBE = 357; - CURRENT_P = 358; - CURRENT_CATALOG = 359; - CURRENT_DATE = 360; - CURRENT_ROLE = 361; - CURRENT_SCHEMA = 362; - CURRENT_TIME = 363; - CURRENT_TIMESTAMP = 364; - CURRENT_USER = 365; - CURSOR = 366; - CYCLE = 367; - DATA_P = 368; - DATABASE = 369; - DAY_P = 370; - DEALLOCATE = 371; - DEC = 372; - DECIMAL_P = 373; - DECLARE = 374; - DEFAULT = 375; - DEFAULTS = 376; - DEFERRABLE = 377; - DEFERRED = 378; - DEFINER = 379; - DELETE_P = 380; - DELIMITER = 381; - DELIMITERS = 382; - DEPENDS = 383; - DEPTH = 384; - DESC = 385; - DETACH = 386; - DICTIONARY = 387; - DISABLE_P = 388; - DISCARD = 389; - DISTINCT = 390; - DO = 391; - DOCUMENT_P = 392; - DOMAIN_P = 393; - DOUBLE_P = 394; - DROP = 395; - EACH = 396; - ELSE = 397; - ENABLE_P = 398; - ENCODING = 399; - ENCRYPTED = 400; - END_P = 401; - ENUM_P = 402; - ESCAPE = 403; - EVENT = 404; - EXCEPT = 405; - EXCLUDE = 406; - EXCLUDING = 407; - EXCLUSIVE = 408; - EXECUTE = 409; - EXISTS = 410; - EXPLAIN = 411; - EXPRESSION = 412; - EXTENSION = 413; - EXTERNAL = 414; - EXTRACT = 415; - FALSE_P = 416; - FAMILY = 417; - FETCH = 418; - FILTER = 419; - FINALIZE = 420; - FIRST_P = 421; - FLOAT_P = 422; - FOLLOWING = 423; - FOR = 424; - FORCE = 425; - FOREIGN = 426; - FORWARD = 427; - FREEZE = 428; - FROM = 429; - FULL = 430; - FUNCTION = 431; - FUNCTIONS = 432; - GENERATED = 433; - GLOBAL = 434; - GRANT = 435; - GRANTED = 436; - GREATEST = 437; - GROUP_P = 438; - GROUPING = 439; - GROUPS = 440; - HANDLER = 441; - HAVING = 442; - HEADER_P = 443; - HOLD = 444; - HOUR_P = 445; - IDENTITY_P = 446; - IF_P = 447; - ILIKE = 448; - IMMEDIATE = 449; - IMMUTABLE = 450; - IMPLICIT_P = 451; - IMPORT_P = 452; - IN_P = 453; - INCLUDE = 454; - INCLUDING = 455; - INCREMENT = 456; - INDEX = 457; - INDEXES = 458; - INHERIT = 459; - INHERITS = 460; - INITIALLY = 461; - INLINE_P = 462; - INNER_P = 463; - INOUT = 464; - INPUT_P = 465; - INSENSITIVE = 466; - INSERT = 467; - INSTEAD = 468; - INT_P = 469; - INTEGER = 470; - INTERSECT = 471; - INTERVAL = 472; - INTO = 473; - INVOKER = 474; - IS = 475; - ISNULL = 476; - ISOLATION = 477; - JOIN = 478; - KEY = 479; - LABEL = 480; - LANGUAGE = 481; - LARGE_P = 482; - LAST_P = 483; - LATERAL_P = 484; - LEADING = 485; - LEAKPROOF = 486; - LEAST = 487; - LEFT = 488; - LEVEL = 489; - LIKE = 490; - LIMIT = 491; - LISTEN = 492; - LOAD = 493; - LOCAL = 494; - LOCALTIME = 495; - LOCALTIMESTAMP = 496; - LOCATION = 497; - LOCK_P = 498; - LOCKED = 499; - LOGGED = 500; - MAPPING = 501; - MATCH = 502; - MATCHED = 503; - MATERIALIZED = 504; - MAXVALUE = 505; - MERGE = 506; - METHOD = 507; - MINUTE_P = 508; - MINVALUE = 509; - MODE = 510; - MONTH_P = 511; - MOVE = 512; - NAME_P = 513; - NAMES = 514; - NATIONAL = 515; - NATURAL = 516; - NCHAR = 517; - NEW = 518; - NEXT = 519; - NFC = 520; - NFD = 521; - NFKC = 522; - NFKD = 523; - NO = 524; - NONE = 525; - NORMALIZE = 526; - NORMALIZED = 527; - NOT = 528; - NOTHING = 529; - NOTIFY = 530; - NOTNULL = 531; - NOWAIT = 532; - NULL_P = 533; - NULLIF = 534; - NULLS_P = 535; - NUMERIC = 536; - OBJECT_P = 537; - OF = 538; - OFF = 539; - OFFSET = 540; - OIDS = 541; - OLD = 542; - ON = 543; - ONLY = 544; - OPERATOR = 545; - OPTION = 546; - OPTIONS = 547; - OR = 548; - ORDER = 549; - ORDINALITY = 550; - OTHERS = 551; - OUT_P = 552; - OUTER_P = 553; - OVER = 554; - OVERLAPS = 555; - OVERLAY = 556; - OVERRIDING = 557; - OWNED = 558; - OWNER = 559; - PARALLEL = 560; - PARAMETER = 561; - PARSER = 562; - PARTIAL = 563; - PARTITION = 564; - PASSING = 565; - PASSWORD = 566; - PLACING = 567; - PLANS = 568; - POLICY = 569; - POSITION = 570; - PRECEDING = 571; - PRECISION = 572; - PRESERVE = 573; - PREPARE = 574; - PREPARED = 575; - PRIMARY = 576; - PRIOR = 577; - PRIVILEGES = 578; - PROCEDURAL = 579; - PROCEDURE = 580; - PROCEDURES = 581; - PROGRAM = 582; - PUBLICATION = 583; - QUOTE = 584; - RANGE = 585; - READ = 586; - REAL = 587; - REASSIGN = 588; - RECHECK = 589; - RECURSIVE = 590; - REF_P = 591; - REFERENCES = 592; - REFERENCING = 593; - REFRESH = 594; - REINDEX = 595; - RELATIVE_P = 596; - RELEASE = 597; - RENAME = 598; - REPEATABLE = 599; - REPLACE = 600; - REPLICA = 601; - RESET = 602; - RESTART = 603; - RESTRICT = 604; - RETURN = 605; - RETURNING = 606; - RETURNS = 607; - REVOKE = 608; - RIGHT = 609; - ROLE = 610; - ROLLBACK = 611; - ROLLUP = 612; - ROUTINE = 613; - ROUTINES = 614; - ROW = 615; - ROWS = 616; - RULE = 617; - SAVEPOINT = 618; - SCHEMA = 619; - SCHEMAS = 620; - SCROLL = 621; - SEARCH = 622; - SECOND_P = 623; - SECURITY = 624; - SELECT = 625; - SEQUENCE = 626; - SEQUENCES = 627; - SERIALIZABLE = 628; - SERVER = 629; - SESSION = 630; - SESSION_USER = 631; - SET = 632; - SETS = 633; - SETOF = 634; - SHARE = 635; - SHOW = 636; - SIMILAR = 637; - SIMPLE = 638; - SKIP = 639; - SMALLINT = 640; - SNAPSHOT = 641; - SOME = 642; - SQL_P = 643; - STABLE = 644; - STANDALONE_P = 645; - START = 646; - STATEMENT = 647; - STATISTICS = 648; - STDIN = 649; - STDOUT = 650; - STORAGE = 651; - STORED = 652; - STRICT_P = 653; - STRIP_P = 654; - SUBSCRIPTION = 655; - SUBSTRING = 656; - SUPPORT = 657; - SYMMETRIC = 658; - SYSID = 659; - SYSTEM_P = 660; - TABLE = 661; - TABLES = 662; - TABLESAMPLE = 663; - TABLESPACE = 664; - TEMP = 665; - TEMPLATE = 666; - TEMPORARY = 667; - TEXT_P = 668; - THEN = 669; - TIES = 670; - TIME = 671; - TIMESTAMP = 672; - TO = 673; - TRAILING = 674; - TRANSACTION = 675; - TRANSFORM = 676; - TREAT = 677; - TRIGGER = 678; - TRIM = 679; - TRUE_P = 680; - TRUNCATE = 681; - TRUSTED = 682; - TYPE_P = 683; - TYPES_P = 684; - UESCAPE = 685; - UNBOUNDED = 686; - UNCOMMITTED = 687; - UNENCRYPTED = 688; - UNION = 689; - UNIQUE = 690; - UNKNOWN = 691; - UNLISTEN = 692; - UNLOGGED = 693; - UNTIL = 694; - UPDATE = 695; - USER = 696; - USING = 697; - VACUUM = 698; - VALID = 699; - VALIDATE = 700; - VALIDATOR = 701; - VALUE_P = 702; - VALUES = 703; - VARCHAR = 704; - VARIADIC = 705; - VARYING = 706; - VERBOSE = 707; - VERSION_P = 708; - VIEW = 709; - VIEWS = 710; - VOLATILE = 711; - WHEN = 712; - WHERE = 713; - WHITESPACE_P = 714; - WINDOW = 715; - WITH = 716; - WITHIN = 717; - WITHOUT = 718; - WORK = 719; - WRAPPER = 720; - WRITE = 721; - XML_P = 722; - XMLATTRIBUTES = 723; - XMLCONCAT = 724; - XMLELEMENT = 725; - XMLEXISTS = 726; - XMLFOREST = 727; - XMLNAMESPACES = 728; - XMLPARSE = 729; - XMLPI = 730; - XMLROOT = 731; - XMLSERIALIZE = 732; - XMLTABLE = 733; - YEAR_P = 734; - YES_P = 735; - ZONE = 736; - NOT_LA = 737; - NULLS_LA = 738; - WITH_LA = 739; - MODE_TYPE_NAME = 740; - MODE_PLPGSQL_EXPR = 741; - MODE_PLPGSQL_ASSIGN1 = 742; - MODE_PLPGSQL_ASSIGN2 = 743; - MODE_PLPGSQL_ASSIGN3 = 744; - UMINUS = 745; + ABSENT = 278; + ABSOLUTE_P = 279; + ACCESS = 280; + ACTION = 281; + ADD_P = 282; + ADMIN = 283; + AFTER = 284; + AGGREGATE = 285; + ALL = 286; + ALSO = 287; + ALTER = 288; + ALWAYS = 289; + ANALYSE = 290; + ANALYZE = 291; + AND = 292; + ANY = 293; + ARRAY = 294; + AS = 295; + ASC = 296; + ASENSITIVE = 297; + ASSERTION = 298; + ASSIGNMENT = 299; + ASYMMETRIC = 300; + ATOMIC = 301; + AT = 302; + ATTACH = 303; + ATTRIBUTE = 304; + AUTHORIZATION = 305; + BACKWARD = 306; + BEFORE = 307; + BEGIN_P = 308; + BETWEEN = 309; + BIGINT = 310; + BINARY = 311; + BIT = 312; + BOOLEAN_P = 313; + BOTH = 314; + BREADTH = 315; + BY = 316; + CACHE = 317; + CALL = 318; + CALLED = 319; + CASCADE = 320; + CASCADED = 321; + CASE = 322; + CAST = 323; + CATALOG_P = 324; + CHAIN = 325; + CHAR_P = 326; + CHARACTER = 327; + CHARACTERISTICS = 328; + CHECK = 329; + CHECKPOINT = 330; + CLASS = 331; + CLOSE = 332; + CLUSTER = 333; + COALESCE = 334; + COLLATE = 335; + COLLATION = 336; + COLUMN = 337; + COLUMNS = 338; + COMMENT = 339; + COMMENTS = 340; + COMMIT = 341; + COMMITTED = 342; + COMPRESSION = 343; + CONCURRENTLY = 344; + CONFIGURATION = 345; + CONFLICT = 346; + CONNECTION = 347; + CONSTRAINT = 348; + CONSTRAINTS = 349; + CONTENT_P = 350; + CONTINUE_P = 351; + CONVERSION_P = 352; + COPY = 353; + COST = 354; + CREATE = 355; + CROSS = 356; + CSV = 357; + CUBE = 358; + CURRENT_P = 359; + CURRENT_CATALOG = 360; + CURRENT_DATE = 361; + CURRENT_ROLE = 362; + CURRENT_SCHEMA = 363; + CURRENT_TIME = 364; + CURRENT_TIMESTAMP = 365; + CURRENT_USER = 366; + CURSOR = 367; + CYCLE = 368; + DATA_P = 369; + DATABASE = 370; + DAY_P = 371; + DEALLOCATE = 372; + DEC = 373; + DECIMAL_P = 374; + DECLARE = 375; + DEFAULT = 376; + DEFAULTS = 377; + DEFERRABLE = 378; + DEFERRED = 379; + DEFINER = 380; + DELETE_P = 381; + DELIMITER = 382; + DELIMITERS = 383; + DEPENDS = 384; + DEPTH = 385; + DESC = 386; + DETACH = 387; + DICTIONARY = 388; + DISABLE_P = 389; + DISCARD = 390; + DISTINCT = 391; + DO = 392; + DOCUMENT_P = 393; + DOMAIN_P = 394; + DOUBLE_P = 395; + DROP = 396; + EACH = 397; + ELSE = 398; + ENABLE_P = 399; + ENCODING = 400; + ENCRYPTED = 401; + END_P = 402; + ENUM_P = 403; + ESCAPE = 404; + EVENT = 405; + EXCEPT = 406; + EXCLUDE = 407; + EXCLUDING = 408; + EXCLUSIVE = 409; + EXECUTE = 410; + EXISTS = 411; + EXPLAIN = 412; + EXPRESSION = 413; + EXTENSION = 414; + EXTERNAL = 415; + EXTRACT = 416; + FALSE_P = 417; + FAMILY = 418; + FETCH = 419; + FILTER = 420; + FINALIZE = 421; + FIRST_P = 422; + FLOAT_P = 423; + FOLLOWING = 424; + FOR = 425; + FORCE = 426; + FOREIGN = 427; + FORMAT = 428; + FORWARD = 429; + FREEZE = 430; + FROM = 431; + FULL = 432; + FUNCTION = 433; + FUNCTIONS = 434; + GENERATED = 435; + GLOBAL = 436; + GRANT = 437; + GRANTED = 438; + GREATEST = 439; + GROUP_P = 440; + GROUPING = 441; + GROUPS = 442; + HANDLER = 443; + HAVING = 444; + HEADER_P = 445; + HOLD = 446; + HOUR_P = 447; + IDENTITY_P = 448; + IF_P = 449; + ILIKE = 450; + IMMEDIATE = 451; + IMMUTABLE = 452; + IMPLICIT_P = 453; + IMPORT_P = 454; + IN_P = 455; + INCLUDE = 456; + INCLUDING = 457; + INCREMENT = 458; + INDENT = 459; + INDEX = 460; + INDEXES = 461; + INHERIT = 462; + INHERITS = 463; + INITIALLY = 464; + INLINE_P = 465; + INNER_P = 466; + INOUT = 467; + INPUT_P = 468; + INSENSITIVE = 469; + INSERT = 470; + INSTEAD = 471; + INT_P = 472; + INTEGER = 473; + INTERSECT = 474; + INTERVAL = 475; + INTO = 476; + INVOKER = 477; + IS = 478; + ISNULL = 479; + ISOLATION = 480; + JOIN = 481; + JSON = 482; + JSON_ARRAY = 483; + JSON_ARRAYAGG = 484; + JSON_OBJECT = 485; + JSON_OBJECTAGG = 486; + KEY = 487; + KEYS = 488; + LABEL = 489; + LANGUAGE = 490; + LARGE_P = 491; + LAST_P = 492; + LATERAL_P = 493; + LEADING = 494; + LEAKPROOF = 495; + LEAST = 496; + LEFT = 497; + LEVEL = 498; + LIKE = 499; + LIMIT = 500; + LISTEN = 501; + LOAD = 502; + LOCAL = 503; + LOCALTIME = 504; + LOCALTIMESTAMP = 505; + LOCATION = 506; + LOCK_P = 507; + LOCKED = 508; + LOGGED = 509; + MAPPING = 510; + MATCH = 511; + MATCHED = 512; + MATERIALIZED = 513; + MAXVALUE = 514; + MERGE = 515; + METHOD = 516; + MINUTE_P = 517; + MINVALUE = 518; + MODE = 519; + MONTH_P = 520; + MOVE = 521; + NAME_P = 522; + NAMES = 523; + NATIONAL = 524; + NATURAL = 525; + NCHAR = 526; + NEW = 527; + NEXT = 528; + NFC = 529; + NFD = 530; + NFKC = 531; + NFKD = 532; + NO = 533; + NONE = 534; + NORMALIZE = 535; + NORMALIZED = 536; + NOT = 537; + NOTHING = 538; + NOTIFY = 539; + NOTNULL = 540; + NOWAIT = 541; + NULL_P = 542; + NULLIF = 543; + NULLS_P = 544; + NUMERIC = 545; + OBJECT_P = 546; + OF = 547; + OFF = 548; + OFFSET = 549; + OIDS = 550; + OLD = 551; + ON = 552; + ONLY = 553; + OPERATOR = 554; + OPTION = 555; + OPTIONS = 556; + OR = 557; + ORDER = 558; + ORDINALITY = 559; + OTHERS = 560; + OUT_P = 561; + OUTER_P = 562; + OVER = 563; + OVERLAPS = 564; + OVERLAY = 565; + OVERRIDING = 566; + OWNED = 567; + OWNER = 568; + PARALLEL = 569; + PARAMETER = 570; + PARSER = 571; + PARTIAL = 572; + PARTITION = 573; + PASSING = 574; + PASSWORD = 575; + PLACING = 576; + PLANS = 577; + POLICY = 578; + POSITION = 579; + PRECEDING = 580; + PRECISION = 581; + PRESERVE = 582; + PREPARE = 583; + PREPARED = 584; + PRIMARY = 585; + PRIOR = 586; + PRIVILEGES = 587; + PROCEDURAL = 588; + PROCEDURE = 589; + PROCEDURES = 590; + PROGRAM = 591; + PUBLICATION = 592; + QUOTE = 593; + RANGE = 594; + READ = 595; + REAL = 596; + REASSIGN = 597; + RECHECK = 598; + RECURSIVE = 599; + REF_P = 600; + REFERENCES = 601; + REFERENCING = 602; + REFRESH = 603; + REINDEX = 604; + RELATIVE_P = 605; + RELEASE = 606; + RENAME = 607; + REPEATABLE = 608; + REPLACE = 609; + REPLICA = 610; + RESET = 611; + RESTART = 612; + RESTRICT = 613; + RETURN = 614; + RETURNING = 615; + RETURNS = 616; + REVOKE = 617; + RIGHT = 618; + ROLE = 619; + ROLLBACK = 620; + ROLLUP = 621; + ROUTINE = 622; + ROUTINES = 623; + ROW = 624; + ROWS = 625; + RULE = 626; + SAVEPOINT = 627; + SCALAR = 628; + SCHEMA = 629; + SCHEMAS = 630; + SCROLL = 631; + SEARCH = 632; + SECOND_P = 633; + SECURITY = 634; + SELECT = 635; + SEQUENCE = 636; + SEQUENCES = 637; + SERIALIZABLE = 638; + SERVER = 639; + SESSION = 640; + SESSION_USER = 641; + SET = 642; + SETS = 643; + SETOF = 644; + SHARE = 645; + SHOW = 646; + SIMILAR = 647; + SIMPLE = 648; + SKIP = 649; + SMALLINT = 650; + SNAPSHOT = 651; + SOME = 652; + SQL_P = 653; + STABLE = 654; + STANDALONE_P = 655; + START = 656; + STATEMENT = 657; + STATISTICS = 658; + STDIN = 659; + STDOUT = 660; + STORAGE = 661; + STORED = 662; + STRICT_P = 663; + STRIP_P = 664; + SUBSCRIPTION = 665; + SUBSTRING = 666; + SUPPORT = 667; + SYMMETRIC = 668; + SYSID = 669; + SYSTEM_P = 670; + SYSTEM_USER = 671; + TABLE = 672; + TABLES = 673; + TABLESAMPLE = 674; + TABLESPACE = 675; + TEMP = 676; + TEMPLATE = 677; + TEMPORARY = 678; + TEXT_P = 679; + THEN = 680; + TIES = 681; + TIME = 682; + TIMESTAMP = 683; + TO = 684; + TRAILING = 685; + TRANSACTION = 686; + TRANSFORM = 687; + TREAT = 688; + TRIGGER = 689; + TRIM = 690; + TRUE_P = 691; + TRUNCATE = 692; + TRUSTED = 693; + TYPE_P = 694; + TYPES_P = 695; + UESCAPE = 696; + UNBOUNDED = 697; + UNCOMMITTED = 698; + UNENCRYPTED = 699; + UNION = 700; + UNIQUE = 701; + UNKNOWN = 702; + UNLISTEN = 703; + UNLOGGED = 704; + UNTIL = 705; + UPDATE = 706; + USER = 707; + USING = 708; + VACUUM = 709; + VALID = 710; + VALIDATE = 711; + VALIDATOR = 712; + VALUE_P = 713; + VALUES = 714; + VARCHAR = 715; + VARIADIC = 716; + VARYING = 717; + VERBOSE = 718; + VERSION_P = 719; + VIEW = 720; + VIEWS = 721; + VOLATILE = 722; + WHEN = 723; + WHERE = 724; + WHITESPACE_P = 725; + WINDOW = 726; + WITH = 727; + WITHIN = 728; + WITHOUT = 729; + WORK = 730; + WRAPPER = 731; + WRITE = 732; + XML_P = 733; + XMLATTRIBUTES = 734; + XMLCONCAT = 735; + XMLELEMENT = 736; + XMLEXISTS = 737; + XMLFOREST = 738; + XMLNAMESPACES = 739; + XMLPARSE = 740; + XMLPI = 741; + XMLROOT = 742; + XMLSERIALIZE = 743; + XMLTABLE = 744; + YEAR_P = 745; + YES_P = 746; + ZONE = 747; + FORMAT_LA = 748; + NOT_LA = 749; + NULLS_LA = 750; + WITH_LA = 751; + WITHOUT_LA = 752; + MODE_TYPE_NAME = 753; + MODE_PLPGSQL_EXPR = 754; + MODE_PLPGSQL_ASSIGN1 = 755; + MODE_PLPGSQL_ASSIGN2 = 756; + MODE_PLPGSQL_ASSIGN3 = 757; + UMINUS = 758; } diff --git a/src/pg_query_enum_defs.c b/src/pg_query_enum_defs.c index a64ccb6f..378ca9df 100644 --- a/src/pg_query_enum_defs.c +++ b/src/pg_query_enum_defs.c @@ -123,6 +123,17 @@ _enumToStringDefElemAction(DefElemAction value) { return NULL; } +static const char* +_enumToStringPartitionStrategy(PartitionStrategy value) { + switch(value) { + case PARTITION_STRATEGY_LIST: return "PARTITION_STRATEGY_LIST"; + case PARTITION_STRATEGY_RANGE: return "PARTITION_STRATEGY_RANGE"; + case PARTITION_STRATEGY_HASH: return "PARTITION_STRATEGY_HASH"; + } + Assert(false); + return NULL; +} + static const char* _enumToStringPartitionRangeDatumKind(PartitionRangeDatumKind value) { switch(value) { @@ -275,7 +286,6 @@ static const char* _enumToStringAlterTableType(AlterTableType value) { switch(value) { case AT_AddColumn: return "AT_AddColumn"; - case AT_AddColumnRecurse: return "AT_AddColumnRecurse"; case AT_AddColumnToView: return "AT_AddColumnToView"; case AT_ColumnDefault: return "AT_ColumnDefault"; case AT_CookedColumnDefault: return "AT_CookedColumnDefault"; @@ -289,19 +299,15 @@ _enumToStringAlterTableType(AlterTableType value) { case AT_SetStorage: return "AT_SetStorage"; case AT_SetCompression: return "AT_SetCompression"; case AT_DropColumn: return "AT_DropColumn"; - case AT_DropColumnRecurse: return "AT_DropColumnRecurse"; case AT_AddIndex: return "AT_AddIndex"; case AT_ReAddIndex: return "AT_ReAddIndex"; case AT_AddConstraint: return "AT_AddConstraint"; - case AT_AddConstraintRecurse: return "AT_AddConstraintRecurse"; case AT_ReAddConstraint: return "AT_ReAddConstraint"; case AT_ReAddDomainConstraint: return "AT_ReAddDomainConstraint"; case AT_AlterConstraint: return "AT_AlterConstraint"; case AT_ValidateConstraint: return "AT_ValidateConstraint"; - case AT_ValidateConstraintRecurse: return "AT_ValidateConstraintRecurse"; case AT_AddIndexConstraint: return "AT_AddIndexConstraint"; case AT_DropConstraint: return "AT_DropConstraint"; - case AT_DropConstraintRecurse: return "AT_DropConstraintRecurse"; case AT_ReAddComment: return "AT_ReAddComment"; case AT_AlterColumnType: return "AT_AlterColumnType"; case AT_AlterColumnGenericOptions: return "AT_AlterColumnGenericOptions"; @@ -699,6 +705,53 @@ _enumToStringXmlOptionType(XmlOptionType value) { return NULL; } +static const char* +_enumToStringJsonEncoding(JsonEncoding value) { + switch(value) { + case JS_ENC_DEFAULT: return "JS_ENC_DEFAULT"; + case JS_ENC_UTF8: return "JS_ENC_UTF8"; + case JS_ENC_UTF16: return "JS_ENC_UTF16"; + case JS_ENC_UTF32: return "JS_ENC_UTF32"; + } + Assert(false); + return NULL; +} + +static const char* +_enumToStringJsonFormatType(JsonFormatType value) { + switch(value) { + case JS_FORMAT_DEFAULT: return "JS_FORMAT_DEFAULT"; + case JS_FORMAT_JSON: return "JS_FORMAT_JSON"; + case JS_FORMAT_JSONB: return "JS_FORMAT_JSONB"; + } + Assert(false); + return NULL; +} + +static const char* +_enumToStringJsonConstructorType(JsonConstructorType value) { + switch(value) { + case JSCTOR_JSON_OBJECT: return "JSCTOR_JSON_OBJECT"; + case JSCTOR_JSON_ARRAY: return "JSCTOR_JSON_ARRAY"; + case JSCTOR_JSON_OBJECTAGG: return "JSCTOR_JSON_OBJECTAGG"; + case JSCTOR_JSON_ARRAYAGG: return "JSCTOR_JSON_ARRAYAGG"; + } + Assert(false); + return NULL; +} + +static const char* +_enumToStringJsonValueType(JsonValueType value) { + switch(value) { + case JS_TYPE_ANY: return "JS_TYPE_ANY"; + case JS_TYPE_OBJECT: return "JS_TYPE_OBJECT"; + case JS_TYPE_ARRAY: return "JS_TYPE_ARRAY"; + case JS_TYPE_SCALAR: return "JS_TYPE_SCALAR"; + } + Assert(false); + return NULL; +} + static const char* _enumToStringNullTestType(NullTestType value) { switch(value) { @@ -748,6 +801,7 @@ _enumToStringJoinType(JoinType value) { case JOIN_RIGHT: return "JOIN_RIGHT"; case JOIN_SEMI: return "JOIN_SEMI"; case JOIN_ANTI: return "JOIN_ANTI"; + case JOIN_RIGHT_ANTI: return "JOIN_RIGHT_ANTI"; case JOIN_UNIQUE_OUTER: return "JOIN_UNIQUE_OUTER"; case JOIN_UNIQUE_INNER: return "JOIN_UNIQUE_INNER"; } @@ -979,6 +1033,17 @@ _enumToIntDefElemAction(DefElemAction value) { return -1; } +static int +_enumToIntPartitionStrategy(PartitionStrategy value) { + switch(value) { + case PARTITION_STRATEGY_LIST: return 1; + case PARTITION_STRATEGY_RANGE: return 2; + case PARTITION_STRATEGY_HASH: return 3; + } + Assert(false); + return -1; +} + static int _enumToIntPartitionRangeDatumKind(PartitionRangeDatumKind value) { switch(value) { @@ -1131,76 +1196,71 @@ static int _enumToIntAlterTableType(AlterTableType value) { switch(value) { case AT_AddColumn: return 1; - case AT_AddColumnRecurse: return 2; - case AT_AddColumnToView: return 3; - case AT_ColumnDefault: return 4; - case AT_CookedColumnDefault: return 5; - case AT_DropNotNull: return 6; - case AT_SetNotNull: return 7; - case AT_DropExpression: return 8; - case AT_CheckNotNull: return 9; - case AT_SetStatistics: return 10; - case AT_SetOptions: return 11; - case AT_ResetOptions: return 12; - case AT_SetStorage: return 13; - case AT_SetCompression: return 14; - case AT_DropColumn: return 15; - case AT_DropColumnRecurse: return 16; - case AT_AddIndex: return 17; - case AT_ReAddIndex: return 18; - case AT_AddConstraint: return 19; - case AT_AddConstraintRecurse: return 20; - case AT_ReAddConstraint: return 21; - case AT_ReAddDomainConstraint: return 22; - case AT_AlterConstraint: return 23; - case AT_ValidateConstraint: return 24; - case AT_ValidateConstraintRecurse: return 25; - case AT_AddIndexConstraint: return 26; - case AT_DropConstraint: return 27; - case AT_DropConstraintRecurse: return 28; - case AT_ReAddComment: return 29; - case AT_AlterColumnType: return 30; - case AT_AlterColumnGenericOptions: return 31; - case AT_ChangeOwner: return 32; - case AT_ClusterOn: return 33; - case AT_DropCluster: return 34; - case AT_SetLogged: return 35; - case AT_SetUnLogged: return 36; - case AT_DropOids: return 37; - case AT_SetAccessMethod: return 38; - case AT_SetTableSpace: return 39; - case AT_SetRelOptions: return 40; - case AT_ResetRelOptions: return 41; - case AT_ReplaceRelOptions: return 42; - case AT_EnableTrig: return 43; - case AT_EnableAlwaysTrig: return 44; - case AT_EnableReplicaTrig: return 45; - case AT_DisableTrig: return 46; - case AT_EnableTrigAll: return 47; - case AT_DisableTrigAll: return 48; - case AT_EnableTrigUser: return 49; - case AT_DisableTrigUser: return 50; - case AT_EnableRule: return 51; - case AT_EnableAlwaysRule: return 52; - case AT_EnableReplicaRule: return 53; - case AT_DisableRule: return 54; - case AT_AddInherit: return 55; - case AT_DropInherit: return 56; - case AT_AddOf: return 57; - case AT_DropOf: return 58; - case AT_ReplicaIdentity: return 59; - case AT_EnableRowSecurity: return 60; - case AT_DisableRowSecurity: return 61; - case AT_ForceRowSecurity: return 62; - case AT_NoForceRowSecurity: return 63; - case AT_GenericOptions: return 64; - case AT_AttachPartition: return 65; - case AT_DetachPartition: return 66; - case AT_DetachPartitionFinalize: return 67; - case AT_AddIdentity: return 68; - case AT_SetIdentity: return 69; - case AT_DropIdentity: return 70; - case AT_ReAddStatistics: return 71; + case AT_AddColumnToView: return 2; + case AT_ColumnDefault: return 3; + case AT_CookedColumnDefault: return 4; + case AT_DropNotNull: return 5; + case AT_SetNotNull: return 6; + case AT_DropExpression: return 7; + case AT_CheckNotNull: return 8; + case AT_SetStatistics: return 9; + case AT_SetOptions: return 10; + case AT_ResetOptions: return 11; + case AT_SetStorage: return 12; + case AT_SetCompression: return 13; + case AT_DropColumn: return 14; + case AT_AddIndex: return 15; + case AT_ReAddIndex: return 16; + case AT_AddConstraint: return 17; + case AT_ReAddConstraint: return 18; + case AT_ReAddDomainConstraint: return 19; + case AT_AlterConstraint: return 20; + case AT_ValidateConstraint: return 21; + case AT_AddIndexConstraint: return 22; + case AT_DropConstraint: return 23; + case AT_ReAddComment: return 24; + case AT_AlterColumnType: return 25; + case AT_AlterColumnGenericOptions: return 26; + case AT_ChangeOwner: return 27; + case AT_ClusterOn: return 28; + case AT_DropCluster: return 29; + case AT_SetLogged: return 30; + case AT_SetUnLogged: return 31; + case AT_DropOids: return 32; + case AT_SetAccessMethod: return 33; + case AT_SetTableSpace: return 34; + case AT_SetRelOptions: return 35; + case AT_ResetRelOptions: return 36; + case AT_ReplaceRelOptions: return 37; + case AT_EnableTrig: return 38; + case AT_EnableAlwaysTrig: return 39; + case AT_EnableReplicaTrig: return 40; + case AT_DisableTrig: return 41; + case AT_EnableTrigAll: return 42; + case AT_DisableTrigAll: return 43; + case AT_EnableTrigUser: return 44; + case AT_DisableTrigUser: return 45; + case AT_EnableRule: return 46; + case AT_EnableAlwaysRule: return 47; + case AT_EnableReplicaRule: return 48; + case AT_DisableRule: return 49; + case AT_AddInherit: return 50; + case AT_DropInherit: return 51; + case AT_AddOf: return 52; + case AT_DropOf: return 53; + case AT_ReplicaIdentity: return 54; + case AT_EnableRowSecurity: return 55; + case AT_DisableRowSecurity: return 56; + case AT_ForceRowSecurity: return 57; + case AT_NoForceRowSecurity: return 58; + case AT_GenericOptions: return 59; + case AT_AttachPartition: return 60; + case AT_DetachPartition: return 61; + case AT_DetachPartitionFinalize: return 62; + case AT_AddIdentity: return 63; + case AT_SetIdentity: return 64; + case AT_DropIdentity: return 65; + case AT_ReAddStatistics: return 66; } Assert(false); return -1; @@ -1555,6 +1615,53 @@ _enumToIntXmlOptionType(XmlOptionType value) { return -1; } +static int +_enumToIntJsonEncoding(JsonEncoding value) { + switch(value) { + case JS_ENC_DEFAULT: return 1; + case JS_ENC_UTF8: return 2; + case JS_ENC_UTF16: return 3; + case JS_ENC_UTF32: return 4; + } + Assert(false); + return -1; +} + +static int +_enumToIntJsonFormatType(JsonFormatType value) { + switch(value) { + case JS_FORMAT_DEFAULT: return 1; + case JS_FORMAT_JSON: return 2; + case JS_FORMAT_JSONB: return 3; + } + Assert(false); + return -1; +} + +static int +_enumToIntJsonConstructorType(JsonConstructorType value) { + switch(value) { + case JSCTOR_JSON_OBJECT: return 1; + case JSCTOR_JSON_ARRAY: return 2; + case JSCTOR_JSON_OBJECTAGG: return 3; + case JSCTOR_JSON_ARRAYAGG: return 4; + } + Assert(false); + return -1; +} + +static int +_enumToIntJsonValueType(JsonValueType value) { + switch(value) { + case JS_TYPE_ANY: return 1; + case JS_TYPE_OBJECT: return 2; + case JS_TYPE_ARRAY: return 3; + case JS_TYPE_SCALAR: return 4; + } + Assert(false); + return -1; +} + static int _enumToIntNullTestType(NullTestType value) { switch(value) { @@ -1604,8 +1711,9 @@ _enumToIntJoinType(JoinType value) { case JOIN_RIGHT: return 4; case JOIN_SEMI: return 5; case JOIN_ANTI: return 6; - case JOIN_UNIQUE_OUTER: return 7; - case JOIN_UNIQUE_INNER: return 8; + case JOIN_RIGHT_ANTI: return 7; + case JOIN_UNIQUE_OUTER: return 8; + case JOIN_UNIQUE_INNER: return 9; } Assert(false); return -1; @@ -1835,6 +1943,17 @@ _intToEnumDefElemAction(int value) { return DEFELEM_UNSPEC; } +static PartitionStrategy +_intToEnumPartitionStrategy(int value) { + switch(value) { + case 1: return PARTITION_STRATEGY_LIST; + case 2: return PARTITION_STRATEGY_RANGE; + case 3: return PARTITION_STRATEGY_HASH; + } + Assert(false); + return PARTITION_STRATEGY_LIST; +} + static PartitionRangeDatumKind _intToEnumPartitionRangeDatumKind(int value) { switch(value) { @@ -1987,76 +2106,71 @@ static AlterTableType _intToEnumAlterTableType(int value) { switch(value) { case 1: return AT_AddColumn; - case 2: return AT_AddColumnRecurse; - case 3: return AT_AddColumnToView; - case 4: return AT_ColumnDefault; - case 5: return AT_CookedColumnDefault; - case 6: return AT_DropNotNull; - case 7: return AT_SetNotNull; - case 8: return AT_DropExpression; - case 9: return AT_CheckNotNull; - case 10: return AT_SetStatistics; - case 11: return AT_SetOptions; - case 12: return AT_ResetOptions; - case 13: return AT_SetStorage; - case 14: return AT_SetCompression; - case 15: return AT_DropColumn; - case 16: return AT_DropColumnRecurse; - case 17: return AT_AddIndex; - case 18: return AT_ReAddIndex; - case 19: return AT_AddConstraint; - case 20: return AT_AddConstraintRecurse; - case 21: return AT_ReAddConstraint; - case 22: return AT_ReAddDomainConstraint; - case 23: return AT_AlterConstraint; - case 24: return AT_ValidateConstraint; - case 25: return AT_ValidateConstraintRecurse; - case 26: return AT_AddIndexConstraint; - case 27: return AT_DropConstraint; - case 28: return AT_DropConstraintRecurse; - case 29: return AT_ReAddComment; - case 30: return AT_AlterColumnType; - case 31: return AT_AlterColumnGenericOptions; - case 32: return AT_ChangeOwner; - case 33: return AT_ClusterOn; - case 34: return AT_DropCluster; - case 35: return AT_SetLogged; - case 36: return AT_SetUnLogged; - case 37: return AT_DropOids; - case 38: return AT_SetAccessMethod; - case 39: return AT_SetTableSpace; - case 40: return AT_SetRelOptions; - case 41: return AT_ResetRelOptions; - case 42: return AT_ReplaceRelOptions; - case 43: return AT_EnableTrig; - case 44: return AT_EnableAlwaysTrig; - case 45: return AT_EnableReplicaTrig; - case 46: return AT_DisableTrig; - case 47: return AT_EnableTrigAll; - case 48: return AT_DisableTrigAll; - case 49: return AT_EnableTrigUser; - case 50: return AT_DisableTrigUser; - case 51: return AT_EnableRule; - case 52: return AT_EnableAlwaysRule; - case 53: return AT_EnableReplicaRule; - case 54: return AT_DisableRule; - case 55: return AT_AddInherit; - case 56: return AT_DropInherit; - case 57: return AT_AddOf; - case 58: return AT_DropOf; - case 59: return AT_ReplicaIdentity; - case 60: return AT_EnableRowSecurity; - case 61: return AT_DisableRowSecurity; - case 62: return AT_ForceRowSecurity; - case 63: return AT_NoForceRowSecurity; - case 64: return AT_GenericOptions; - case 65: return AT_AttachPartition; - case 66: return AT_DetachPartition; - case 67: return AT_DetachPartitionFinalize; - case 68: return AT_AddIdentity; - case 69: return AT_SetIdentity; - case 70: return AT_DropIdentity; - case 71: return AT_ReAddStatistics; + case 2: return AT_AddColumnToView; + case 3: return AT_ColumnDefault; + case 4: return AT_CookedColumnDefault; + case 5: return AT_DropNotNull; + case 6: return AT_SetNotNull; + case 7: return AT_DropExpression; + case 8: return AT_CheckNotNull; + case 9: return AT_SetStatistics; + case 10: return AT_SetOptions; + case 11: return AT_ResetOptions; + case 12: return AT_SetStorage; + case 13: return AT_SetCompression; + case 14: return AT_DropColumn; + case 15: return AT_AddIndex; + case 16: return AT_ReAddIndex; + case 17: return AT_AddConstraint; + case 18: return AT_ReAddConstraint; + case 19: return AT_ReAddDomainConstraint; + case 20: return AT_AlterConstraint; + case 21: return AT_ValidateConstraint; + case 22: return AT_AddIndexConstraint; + case 23: return AT_DropConstraint; + case 24: return AT_ReAddComment; + case 25: return AT_AlterColumnType; + case 26: return AT_AlterColumnGenericOptions; + case 27: return AT_ChangeOwner; + case 28: return AT_ClusterOn; + case 29: return AT_DropCluster; + case 30: return AT_SetLogged; + case 31: return AT_SetUnLogged; + case 32: return AT_DropOids; + case 33: return AT_SetAccessMethod; + case 34: return AT_SetTableSpace; + case 35: return AT_SetRelOptions; + case 36: return AT_ResetRelOptions; + case 37: return AT_ReplaceRelOptions; + case 38: return AT_EnableTrig; + case 39: return AT_EnableAlwaysTrig; + case 40: return AT_EnableReplicaTrig; + case 41: return AT_DisableTrig; + case 42: return AT_EnableTrigAll; + case 43: return AT_DisableTrigAll; + case 44: return AT_EnableTrigUser; + case 45: return AT_DisableTrigUser; + case 46: return AT_EnableRule; + case 47: return AT_EnableAlwaysRule; + case 48: return AT_EnableReplicaRule; + case 49: return AT_DisableRule; + case 50: return AT_AddInherit; + case 51: return AT_DropInherit; + case 52: return AT_AddOf; + case 53: return AT_DropOf; + case 54: return AT_ReplicaIdentity; + case 55: return AT_EnableRowSecurity; + case 56: return AT_DisableRowSecurity; + case 57: return AT_ForceRowSecurity; + case 58: return AT_NoForceRowSecurity; + case 59: return AT_GenericOptions; + case 60: return AT_AttachPartition; + case 61: return AT_DetachPartition; + case 62: return AT_DetachPartitionFinalize; + case 63: return AT_AddIdentity; + case 64: return AT_SetIdentity; + case 65: return AT_DropIdentity; + case 66: return AT_ReAddStatistics; } Assert(false); return AT_AddColumn; @@ -2411,6 +2525,53 @@ _intToEnumXmlOptionType(int value) { return XMLOPTION_DOCUMENT; } +static JsonEncoding +_intToEnumJsonEncoding(int value) { + switch(value) { + case 1: return JS_ENC_DEFAULT; + case 2: return JS_ENC_UTF8; + case 3: return JS_ENC_UTF16; + case 4: return JS_ENC_UTF32; + } + Assert(false); + return JS_ENC_DEFAULT; +} + +static JsonFormatType +_intToEnumJsonFormatType(int value) { + switch(value) { + case 1: return JS_FORMAT_DEFAULT; + case 2: return JS_FORMAT_JSON; + case 3: return JS_FORMAT_JSONB; + } + Assert(false); + return JS_FORMAT_DEFAULT; +} + +static JsonConstructorType +_intToEnumJsonConstructorType(int value) { + switch(value) { + case 1: return JSCTOR_JSON_OBJECT; + case 2: return JSCTOR_JSON_ARRAY; + case 3: return JSCTOR_JSON_OBJECTAGG; + case 4: return JSCTOR_JSON_ARRAYAGG; + } + Assert(false); + return JSCTOR_JSON_OBJECT; +} + +static JsonValueType +_intToEnumJsonValueType(int value) { + switch(value) { + case 1: return JS_TYPE_ANY; + case 2: return JS_TYPE_OBJECT; + case 3: return JS_TYPE_ARRAY; + case 4: return JS_TYPE_SCALAR; + } + Assert(false); + return JS_TYPE_ANY; +} + static NullTestType _intToEnumNullTestType(int value) { switch(value) { @@ -2460,8 +2621,9 @@ _intToEnumJoinType(int value) { case 4: return JOIN_RIGHT; case 5: return JOIN_SEMI; case 6: return JOIN_ANTI; - case 7: return JOIN_UNIQUE_OUTER; - case 8: return JOIN_UNIQUE_INNER; + case 7: return JOIN_RIGHT_ANTI; + case 8: return JOIN_UNIQUE_OUTER; + case 9: return JOIN_UNIQUE_INNER; } Assert(false); return JOIN_INNER; diff --git a/src/pg_query_outfuncs_conds.c b/src/pg_query_outfuncs_conds.c index a0d56499..6fa3fb22 100644 --- a/src/pg_query_outfuncs_conds.c +++ b/src/pg_query_outfuncs_conds.c @@ -36,6 +36,9 @@ case T_RangeVar: case T_TableFunc: OUT_NODE(TableFunc, TableFunc, table_func, TABLE_FUNC, TableFunc, table_func); break; +case T_IntoClause: + OUT_NODE(IntoClause, IntoClause, into_clause, INTO_CLAUSE, IntoClause, into_clause); + break; case T_Var: OUT_NODE(Var, Var, var, VAR, Var, var); break; @@ -135,6 +138,21 @@ case T_SQLValueFunction: case T_XmlExpr: OUT_NODE(XmlExpr, XmlExpr, xml_expr, XML_EXPR, XmlExpr, xml_expr); break; +case T_JsonFormat: + OUT_NODE(JsonFormat, JsonFormat, json_format, JSON_FORMAT, JsonFormat, json_format); + break; +case T_JsonReturning: + OUT_NODE(JsonReturning, JsonReturning, json_returning, JSON_RETURNING, JsonReturning, json_returning); + break; +case T_JsonValueExpr: + OUT_NODE(JsonValueExpr, JsonValueExpr, json_value_expr, JSON_VALUE_EXPR, JsonValueExpr, json_value_expr); + break; +case T_JsonConstructorExpr: + OUT_NODE(JsonConstructorExpr, JsonConstructorExpr, json_constructor_expr, JSON_CONSTRUCTOR_EXPR, JsonConstructorExpr, json_constructor_expr); + break; +case T_JsonIsPredicate: + OUT_NODE(JsonIsPredicate, JsonIsPredicate, json_is_predicate, JSON_IS_PREDICATE, JsonIsPredicate, json_is_predicate); + break; case T_NullTest: OUT_NODE(NullTest, NullTest, null_test, NULL_TEST, NullTest, null_test); break; @@ -174,269 +192,278 @@ case T_FromExpr: case T_OnConflictExpr: OUT_NODE(OnConflictExpr, OnConflictExpr, on_conflict_expr, ON_CONFLICT_EXPR, OnConflictExpr, on_conflict_expr); break; -case T_IntoClause: - OUT_NODE(IntoClause, IntoClause, into_clause, INTO_CLAUSE, IntoClause, into_clause); - break; -case T_MergeAction: - OUT_NODE(MergeAction, MergeAction, merge_action, MERGE_ACTION, MergeAction, merge_action); - break; -case T_RawStmt: - OUT_NODE(RawStmt, RawStmt, raw_stmt, RAW_STMT, RawStmt, raw_stmt); - break; case T_Query: OUT_NODE(Query, Query, query, QUERY, Query, query); break; -case T_InsertStmt: - OUT_NODE(InsertStmt, InsertStmt, insert_stmt, INSERT_STMT, InsertStmt, insert_stmt); +case T_TypeName: + OUT_NODE(TypeName, TypeName, type_name, TYPE_NAME, TypeName, type_name); break; -case T_DeleteStmt: - OUT_NODE(DeleteStmt, DeleteStmt, delete_stmt, DELETE_STMT, DeleteStmt, delete_stmt); +case T_ColumnRef: + OUT_NODE(ColumnRef, ColumnRef, column_ref, COLUMN_REF, ColumnRef, column_ref); break; -case T_UpdateStmt: - OUT_NODE(UpdateStmt, UpdateStmt, update_stmt, UPDATE_STMT, UpdateStmt, update_stmt); +case T_ParamRef: + OUT_NODE(ParamRef, ParamRef, param_ref, PARAM_REF, ParamRef, param_ref); break; -case T_MergeStmt: - OUT_NODE(MergeStmt, MergeStmt, merge_stmt, MERGE_STMT, MergeStmt, merge_stmt); +case T_A_Expr: + OUT_NODE(A_Expr, AExpr, a__expr, A_EXPR, A_Expr, a_expr); break; -case T_SelectStmt: - OUT_NODE(SelectStmt, SelectStmt, select_stmt, SELECT_STMT, SelectStmt, select_stmt); +case T_TypeCast: + OUT_NODE(TypeCast, TypeCast, type_cast, TYPE_CAST, TypeCast, type_cast); break; -case T_ReturnStmt: - OUT_NODE(ReturnStmt, ReturnStmt, return_stmt, RETURN_STMT, ReturnStmt, return_stmt); +case T_CollateClause: + OUT_NODE(CollateClause, CollateClause, collate_clause, COLLATE_CLAUSE, CollateClause, collate_clause); break; -case T_PLAssignStmt: - OUT_NODE(PLAssignStmt, PLAssignStmt, plassign_stmt, PLASSIGN_STMT, PLAssignStmt, plassign_stmt); +case T_RoleSpec: + OUT_NODE(RoleSpec, RoleSpec, role_spec, ROLE_SPEC, RoleSpec, role_spec); break; -case T_AlterTableStmt: - OUT_NODE(AlterTableStmt, AlterTableStmt, alter_table_stmt, ALTER_TABLE_STMT, AlterTableStmt, alter_table_stmt); +case T_FuncCall: + OUT_NODE(FuncCall, FuncCall, func_call, FUNC_CALL, FuncCall, func_call); break; -case T_AlterTableCmd: - OUT_NODE(AlterTableCmd, AlterTableCmd, alter_table_cmd, ALTER_TABLE_CMD, AlterTableCmd, alter_table_cmd); +case T_A_Star: + OUT_NODE(A_Star, AStar, a__star, A_STAR, A_Star, a_star); break; -case T_AlterDomainStmt: - OUT_NODE(AlterDomainStmt, AlterDomainStmt, alter_domain_stmt, ALTER_DOMAIN_STMT, AlterDomainStmt, alter_domain_stmt); +case T_A_Indices: + OUT_NODE(A_Indices, AIndices, a__indices, A_INDICES, A_Indices, a_indices); break; -case T_SetOperationStmt: - OUT_NODE(SetOperationStmt, SetOperationStmt, set_operation_stmt, SET_OPERATION_STMT, SetOperationStmt, set_operation_stmt); +case T_A_Indirection: + OUT_NODE(A_Indirection, AIndirection, a__indirection, A_INDIRECTION, A_Indirection, a_indirection); break; -case T_GrantStmt: - OUT_NODE(GrantStmt, GrantStmt, grant_stmt, GRANT_STMT, GrantStmt, grant_stmt); +case T_A_ArrayExpr: + OUT_NODE(A_ArrayExpr, AArrayExpr, a__array_expr, A_ARRAY_EXPR, A_ArrayExpr, a_array_expr); break; -case T_GrantRoleStmt: - OUT_NODE(GrantRoleStmt, GrantRoleStmt, grant_role_stmt, GRANT_ROLE_STMT, GrantRoleStmt, grant_role_stmt); +case T_ResTarget: + OUT_NODE(ResTarget, ResTarget, res_target, RES_TARGET, ResTarget, res_target); break; -case T_AlterDefaultPrivilegesStmt: - OUT_NODE(AlterDefaultPrivilegesStmt, AlterDefaultPrivilegesStmt, alter_default_privileges_stmt, ALTER_DEFAULT_PRIVILEGES_STMT, AlterDefaultPrivilegesStmt, alter_default_privileges_stmt); +case T_MultiAssignRef: + OUT_NODE(MultiAssignRef, MultiAssignRef, multi_assign_ref, MULTI_ASSIGN_REF, MultiAssignRef, multi_assign_ref); break; -case T_ClosePortalStmt: - OUT_NODE(ClosePortalStmt, ClosePortalStmt, close_portal_stmt, CLOSE_PORTAL_STMT, ClosePortalStmt, close_portal_stmt); +case T_SortBy: + OUT_NODE(SortBy, SortBy, sort_by, SORT_BY, SortBy, sort_by); break; -case T_ClusterStmt: - OUT_NODE(ClusterStmt, ClusterStmt, cluster_stmt, CLUSTER_STMT, ClusterStmt, cluster_stmt); +case T_WindowDef: + OUT_NODE(WindowDef, WindowDef, window_def, WINDOW_DEF, WindowDef, window_def); break; -case T_CopyStmt: - OUT_NODE(CopyStmt, CopyStmt, copy_stmt, COPY_STMT, CopyStmt, copy_stmt); +case T_RangeSubselect: + OUT_NODE(RangeSubselect, RangeSubselect, range_subselect, RANGE_SUBSELECT, RangeSubselect, range_subselect); break; -case T_CreateStmt: - OUT_NODE(CreateStmt, CreateStmt, create_stmt, CREATE_STMT, CreateStmt, create_stmt); +case T_RangeFunction: + OUT_NODE(RangeFunction, RangeFunction, range_function, RANGE_FUNCTION, RangeFunction, range_function); break; -case T_DefineStmt: - OUT_NODE(DefineStmt, DefineStmt, define_stmt, DEFINE_STMT, DefineStmt, define_stmt); +case T_RangeTableFunc: + OUT_NODE(RangeTableFunc, RangeTableFunc, range_table_func, RANGE_TABLE_FUNC, RangeTableFunc, range_table_func); break; -case T_DropStmt: - OUT_NODE(DropStmt, DropStmt, drop_stmt, DROP_STMT, DropStmt, drop_stmt); +case T_RangeTableFuncCol: + OUT_NODE(RangeTableFuncCol, RangeTableFuncCol, range_table_func_col, RANGE_TABLE_FUNC_COL, RangeTableFuncCol, range_table_func_col); break; -case T_TruncateStmt: - OUT_NODE(TruncateStmt, TruncateStmt, truncate_stmt, TRUNCATE_STMT, TruncateStmt, truncate_stmt); +case T_RangeTableSample: + OUT_NODE(RangeTableSample, RangeTableSample, range_table_sample, RANGE_TABLE_SAMPLE, RangeTableSample, range_table_sample); break; -case T_CommentStmt: - OUT_NODE(CommentStmt, CommentStmt, comment_stmt, COMMENT_STMT, CommentStmt, comment_stmt); +case T_ColumnDef: + OUT_NODE(ColumnDef, ColumnDef, column_def, COLUMN_DEF, ColumnDef, column_def); break; -case T_FetchStmt: - OUT_NODE(FetchStmt, FetchStmt, fetch_stmt, FETCH_STMT, FetchStmt, fetch_stmt); +case T_TableLikeClause: + OUT_NODE(TableLikeClause, TableLikeClause, table_like_clause, TABLE_LIKE_CLAUSE, TableLikeClause, table_like_clause); break; -case T_IndexStmt: - OUT_NODE(IndexStmt, IndexStmt, index_stmt, INDEX_STMT, IndexStmt, index_stmt); +case T_IndexElem: + OUT_NODE(IndexElem, IndexElem, index_elem, INDEX_ELEM, IndexElem, index_elem); break; -case T_CreateFunctionStmt: - OUT_NODE(CreateFunctionStmt, CreateFunctionStmt, create_function_stmt, CREATE_FUNCTION_STMT, CreateFunctionStmt, create_function_stmt); +case T_DefElem: + OUT_NODE(DefElem, DefElem, def_elem, DEF_ELEM, DefElem, def_elem); break; -case T_AlterFunctionStmt: - OUT_NODE(AlterFunctionStmt, AlterFunctionStmt, alter_function_stmt, ALTER_FUNCTION_STMT, AlterFunctionStmt, alter_function_stmt); +case T_LockingClause: + OUT_NODE(LockingClause, LockingClause, locking_clause, LOCKING_CLAUSE, LockingClause, locking_clause); break; -case T_DoStmt: - OUT_NODE(DoStmt, DoStmt, do_stmt, DO_STMT, DoStmt, do_stmt); +case T_XmlSerialize: + OUT_NODE(XmlSerialize, XmlSerialize, xml_serialize, XML_SERIALIZE, XmlSerialize, xml_serialize); break; -case T_RenameStmt: - OUT_NODE(RenameStmt, RenameStmt, rename_stmt, RENAME_STMT, RenameStmt, rename_stmt); +case T_PartitionElem: + OUT_NODE(PartitionElem, PartitionElem, partition_elem, PARTITION_ELEM, PartitionElem, partition_elem); break; -case T_RuleStmt: - OUT_NODE(RuleStmt, RuleStmt, rule_stmt, RULE_STMT, RuleStmt, rule_stmt); +case T_PartitionSpec: + OUT_NODE(PartitionSpec, PartitionSpec, partition_spec, PARTITION_SPEC, PartitionSpec, partition_spec); break; -case T_NotifyStmt: - OUT_NODE(NotifyStmt, NotifyStmt, notify_stmt, NOTIFY_STMT, NotifyStmt, notify_stmt); +case T_PartitionBoundSpec: + OUT_NODE(PartitionBoundSpec, PartitionBoundSpec, partition_bound_spec, PARTITION_BOUND_SPEC, PartitionBoundSpec, partition_bound_spec); break; -case T_ListenStmt: - OUT_NODE(ListenStmt, ListenStmt, listen_stmt, LISTEN_STMT, ListenStmt, listen_stmt); +case T_PartitionRangeDatum: + OUT_NODE(PartitionRangeDatum, PartitionRangeDatum, partition_range_datum, PARTITION_RANGE_DATUM, PartitionRangeDatum, partition_range_datum); break; -case T_UnlistenStmt: - OUT_NODE(UnlistenStmt, UnlistenStmt, unlisten_stmt, UNLISTEN_STMT, UnlistenStmt, unlisten_stmt); +case T_PartitionCmd: + OUT_NODE(PartitionCmd, PartitionCmd, partition_cmd, PARTITION_CMD, PartitionCmd, partition_cmd); break; -case T_TransactionStmt: - OUT_NODE(TransactionStmt, TransactionStmt, transaction_stmt, TRANSACTION_STMT, TransactionStmt, transaction_stmt); +case T_RangeTblEntry: + OUT_NODE(RangeTblEntry, RangeTblEntry, range_tbl_entry, RANGE_TBL_ENTRY, RangeTblEntry, range_tbl_entry); break; -case T_ViewStmt: - OUT_NODE(ViewStmt, ViewStmt, view_stmt, VIEW_STMT, ViewStmt, view_stmt); +case T_RTEPermissionInfo: + OUT_NODE(RTEPermissionInfo, RTEPermissionInfo, rtepermission_info, RTEPERMISSION_INFO, RTEPermissionInfo, rtepermission_info); break; -case T_LoadStmt: - OUT_NODE(LoadStmt, LoadStmt, load_stmt, LOAD_STMT, LoadStmt, load_stmt); +case T_RangeTblFunction: + OUT_NODE(RangeTblFunction, RangeTblFunction, range_tbl_function, RANGE_TBL_FUNCTION, RangeTblFunction, range_tbl_function); break; -case T_CreateDomainStmt: - OUT_NODE(CreateDomainStmt, CreateDomainStmt, create_domain_stmt, CREATE_DOMAIN_STMT, CreateDomainStmt, create_domain_stmt); +case T_TableSampleClause: + OUT_NODE(TableSampleClause, TableSampleClause, table_sample_clause, TABLE_SAMPLE_CLAUSE, TableSampleClause, table_sample_clause); break; -case T_CreatedbStmt: - OUT_NODE(CreatedbStmt, CreatedbStmt, createdb_stmt, CREATEDB_STMT, CreatedbStmt, createdb_stmt); +case T_WithCheckOption: + OUT_NODE(WithCheckOption, WithCheckOption, with_check_option, WITH_CHECK_OPTION, WithCheckOption, with_check_option); break; -case T_DropdbStmt: - OUT_NODE(DropdbStmt, DropdbStmt, dropdb_stmt, DROPDB_STMT, DropdbStmt, dropdb_stmt); +case T_SortGroupClause: + OUT_NODE(SortGroupClause, SortGroupClause, sort_group_clause, SORT_GROUP_CLAUSE, SortGroupClause, sort_group_clause); break; -case T_VacuumStmt: - OUT_NODE(VacuumStmt, VacuumStmt, vacuum_stmt, VACUUM_STMT, VacuumStmt, vacuum_stmt); +case T_GroupingSet: + OUT_NODE(GroupingSet, GroupingSet, grouping_set, GROUPING_SET, GroupingSet, grouping_set); break; -case T_ExplainStmt: - OUT_NODE(ExplainStmt, ExplainStmt, explain_stmt, EXPLAIN_STMT, ExplainStmt, explain_stmt); +case T_WindowClause: + OUT_NODE(WindowClause, WindowClause, window_clause, WINDOW_CLAUSE, WindowClause, window_clause); break; -case T_CreateTableAsStmt: - OUT_NODE(CreateTableAsStmt, CreateTableAsStmt, create_table_as_stmt, CREATE_TABLE_AS_STMT, CreateTableAsStmt, create_table_as_stmt); +case T_RowMarkClause: + OUT_NODE(RowMarkClause, RowMarkClause, row_mark_clause, ROW_MARK_CLAUSE, RowMarkClause, row_mark_clause); break; -case T_CreateSeqStmt: - OUT_NODE(CreateSeqStmt, CreateSeqStmt, create_seq_stmt, CREATE_SEQ_STMT, CreateSeqStmt, create_seq_stmt); +case T_WithClause: + OUT_NODE(WithClause, WithClause, with_clause, WITH_CLAUSE, WithClause, with_clause); break; -case T_AlterSeqStmt: - OUT_NODE(AlterSeqStmt, AlterSeqStmt, alter_seq_stmt, ALTER_SEQ_STMT, AlterSeqStmt, alter_seq_stmt); +case T_InferClause: + OUT_NODE(InferClause, InferClause, infer_clause, INFER_CLAUSE, InferClause, infer_clause); break; -case T_VariableSetStmt: - OUT_NODE(VariableSetStmt, VariableSetStmt, variable_set_stmt, VARIABLE_SET_STMT, VariableSetStmt, variable_set_stmt); +case T_OnConflictClause: + OUT_NODE(OnConflictClause, OnConflictClause, on_conflict_clause, ON_CONFLICT_CLAUSE, OnConflictClause, on_conflict_clause); break; -case T_VariableShowStmt: - OUT_NODE(VariableShowStmt, VariableShowStmt, variable_show_stmt, VARIABLE_SHOW_STMT, VariableShowStmt, variable_show_stmt); +case T_CTESearchClause: + OUT_NODE(CTESearchClause, CTESearchClause, ctesearch_clause, CTESEARCH_CLAUSE, CTESearchClause, ctesearch_clause); break; -case T_DiscardStmt: - OUT_NODE(DiscardStmt, DiscardStmt, discard_stmt, DISCARD_STMT, DiscardStmt, discard_stmt); +case T_CTECycleClause: + OUT_NODE(CTECycleClause, CTECycleClause, ctecycle_clause, CTECYCLE_CLAUSE, CTECycleClause, ctecycle_clause); break; -case T_CreateTrigStmt: - OUT_NODE(CreateTrigStmt, CreateTrigStmt, create_trig_stmt, CREATE_TRIG_STMT, CreateTrigStmt, create_trig_stmt); +case T_CommonTableExpr: + OUT_NODE(CommonTableExpr, CommonTableExpr, common_table_expr, COMMON_TABLE_EXPR, CommonTableExpr, common_table_expr); break; -case T_CreatePLangStmt: - OUT_NODE(CreatePLangStmt, CreatePLangStmt, create_plang_stmt, CREATE_PLANG_STMT, CreatePLangStmt, create_plang_stmt); +case T_MergeWhenClause: + OUT_NODE(MergeWhenClause, MergeWhenClause, merge_when_clause, MERGE_WHEN_CLAUSE, MergeWhenClause, merge_when_clause); break; -case T_CreateRoleStmt: - OUT_NODE(CreateRoleStmt, CreateRoleStmt, create_role_stmt, CREATE_ROLE_STMT, CreateRoleStmt, create_role_stmt); +case T_MergeAction: + OUT_NODE(MergeAction, MergeAction, merge_action, MERGE_ACTION, MergeAction, merge_action); break; -case T_AlterRoleStmt: - OUT_NODE(AlterRoleStmt, AlterRoleStmt, alter_role_stmt, ALTER_ROLE_STMT, AlterRoleStmt, alter_role_stmt); +case T_TriggerTransition: + OUT_NODE(TriggerTransition, TriggerTransition, trigger_transition, TRIGGER_TRANSITION, TriggerTransition, trigger_transition); break; -case T_DropRoleStmt: - OUT_NODE(DropRoleStmt, DropRoleStmt, drop_role_stmt, DROP_ROLE_STMT, DropRoleStmt, drop_role_stmt); +case T_JsonOutput: + OUT_NODE(JsonOutput, JsonOutput, json_output, JSON_OUTPUT, JsonOutput, json_output); break; -case T_LockStmt: - OUT_NODE(LockStmt, LockStmt, lock_stmt, LOCK_STMT, LockStmt, lock_stmt); +case T_JsonKeyValue: + OUT_NODE(JsonKeyValue, JsonKeyValue, json_key_value, JSON_KEY_VALUE, JsonKeyValue, json_key_value); break; -case T_ConstraintsSetStmt: - OUT_NODE(ConstraintsSetStmt, ConstraintsSetStmt, constraints_set_stmt, CONSTRAINTS_SET_STMT, ConstraintsSetStmt, constraints_set_stmt); +case T_JsonObjectConstructor: + OUT_NODE(JsonObjectConstructor, JsonObjectConstructor, json_object_constructor, JSON_OBJECT_CONSTRUCTOR, JsonObjectConstructor, json_object_constructor); break; -case T_ReindexStmt: - OUT_NODE(ReindexStmt, ReindexStmt, reindex_stmt, REINDEX_STMT, ReindexStmt, reindex_stmt); +case T_JsonArrayConstructor: + OUT_NODE(JsonArrayConstructor, JsonArrayConstructor, json_array_constructor, JSON_ARRAY_CONSTRUCTOR, JsonArrayConstructor, json_array_constructor); break; -case T_CheckPointStmt: - OUT_NODE(CheckPointStmt, CheckPointStmt, check_point_stmt, CHECK_POINT_STMT, CheckPointStmt, check_point_stmt); +case T_JsonArrayQueryConstructor: + OUT_NODE(JsonArrayQueryConstructor, JsonArrayQueryConstructor, json_array_query_constructor, JSON_ARRAY_QUERY_CONSTRUCTOR, JsonArrayQueryConstructor, json_array_query_constructor); break; -case T_CreateSchemaStmt: - OUT_NODE(CreateSchemaStmt, CreateSchemaStmt, create_schema_stmt, CREATE_SCHEMA_STMT, CreateSchemaStmt, create_schema_stmt); +case T_JsonAggConstructor: + OUT_NODE(JsonAggConstructor, JsonAggConstructor, json_agg_constructor, JSON_AGG_CONSTRUCTOR, JsonAggConstructor, json_agg_constructor); break; -case T_AlterDatabaseStmt: - OUT_NODE(AlterDatabaseStmt, AlterDatabaseStmt, alter_database_stmt, ALTER_DATABASE_STMT, AlterDatabaseStmt, alter_database_stmt); +case T_JsonObjectAgg: + OUT_NODE(JsonObjectAgg, JsonObjectAgg, json_object_agg, JSON_OBJECT_AGG, JsonObjectAgg, json_object_agg); break; -case T_AlterDatabaseRefreshCollStmt: - OUT_NODE(AlterDatabaseRefreshCollStmt, AlterDatabaseRefreshCollStmt, alter_database_refresh_coll_stmt, ALTER_DATABASE_REFRESH_COLL_STMT, AlterDatabaseRefreshCollStmt, alter_database_refresh_coll_stmt); +case T_JsonArrayAgg: + OUT_NODE(JsonArrayAgg, JsonArrayAgg, json_array_agg, JSON_ARRAY_AGG, JsonArrayAgg, json_array_agg); break; -case T_AlterDatabaseSetStmt: - OUT_NODE(AlterDatabaseSetStmt, AlterDatabaseSetStmt, alter_database_set_stmt, ALTER_DATABASE_SET_STMT, AlterDatabaseSetStmt, alter_database_set_stmt); +case T_RawStmt: + OUT_NODE(RawStmt, RawStmt, raw_stmt, RAW_STMT, RawStmt, raw_stmt); break; -case T_AlterRoleSetStmt: - OUT_NODE(AlterRoleSetStmt, AlterRoleSetStmt, alter_role_set_stmt, ALTER_ROLE_SET_STMT, AlterRoleSetStmt, alter_role_set_stmt); +case T_InsertStmt: + OUT_NODE(InsertStmt, InsertStmt, insert_stmt, INSERT_STMT, InsertStmt, insert_stmt); break; -case T_CreateConversionStmt: - OUT_NODE(CreateConversionStmt, CreateConversionStmt, create_conversion_stmt, CREATE_CONVERSION_STMT, CreateConversionStmt, create_conversion_stmt); +case T_DeleteStmt: + OUT_NODE(DeleteStmt, DeleteStmt, delete_stmt, DELETE_STMT, DeleteStmt, delete_stmt); break; -case T_CreateCastStmt: - OUT_NODE(CreateCastStmt, CreateCastStmt, create_cast_stmt, CREATE_CAST_STMT, CreateCastStmt, create_cast_stmt); +case T_UpdateStmt: + OUT_NODE(UpdateStmt, UpdateStmt, update_stmt, UPDATE_STMT, UpdateStmt, update_stmt); break; -case T_CreateOpClassStmt: - OUT_NODE(CreateOpClassStmt, CreateOpClassStmt, create_op_class_stmt, CREATE_OP_CLASS_STMT, CreateOpClassStmt, create_op_class_stmt); +case T_MergeStmt: + OUT_NODE(MergeStmt, MergeStmt, merge_stmt, MERGE_STMT, MergeStmt, merge_stmt); break; -case T_CreateOpFamilyStmt: - OUT_NODE(CreateOpFamilyStmt, CreateOpFamilyStmt, create_op_family_stmt, CREATE_OP_FAMILY_STMT, CreateOpFamilyStmt, create_op_family_stmt); +case T_SelectStmt: + OUT_NODE(SelectStmt, SelectStmt, select_stmt, SELECT_STMT, SelectStmt, select_stmt); break; -case T_AlterOpFamilyStmt: - OUT_NODE(AlterOpFamilyStmt, AlterOpFamilyStmt, alter_op_family_stmt, ALTER_OP_FAMILY_STMT, AlterOpFamilyStmt, alter_op_family_stmt); +case T_SetOperationStmt: + OUT_NODE(SetOperationStmt, SetOperationStmt, set_operation_stmt, SET_OPERATION_STMT, SetOperationStmt, set_operation_stmt); break; -case T_PrepareStmt: - OUT_NODE(PrepareStmt, PrepareStmt, prepare_stmt, PREPARE_STMT, PrepareStmt, prepare_stmt); +case T_ReturnStmt: + OUT_NODE(ReturnStmt, ReturnStmt, return_stmt, RETURN_STMT, ReturnStmt, return_stmt); break; -case T_ExecuteStmt: - OUT_NODE(ExecuteStmt, ExecuteStmt, execute_stmt, EXECUTE_STMT, ExecuteStmt, execute_stmt); +case T_PLAssignStmt: + OUT_NODE(PLAssignStmt, PLAssignStmt, plassign_stmt, PLASSIGN_STMT, PLAssignStmt, plassign_stmt); break; -case T_DeallocateStmt: - OUT_NODE(DeallocateStmt, DeallocateStmt, deallocate_stmt, DEALLOCATE_STMT, DeallocateStmt, deallocate_stmt); +case T_CreateSchemaStmt: + OUT_NODE(CreateSchemaStmt, CreateSchemaStmt, create_schema_stmt, CREATE_SCHEMA_STMT, CreateSchemaStmt, create_schema_stmt); break; -case T_DeclareCursorStmt: - OUT_NODE(DeclareCursorStmt, DeclareCursorStmt, declare_cursor_stmt, DECLARE_CURSOR_STMT, DeclareCursorStmt, declare_cursor_stmt); +case T_AlterTableStmt: + OUT_NODE(AlterTableStmt, AlterTableStmt, alter_table_stmt, ALTER_TABLE_STMT, AlterTableStmt, alter_table_stmt); break; -case T_CreateTableSpaceStmt: - OUT_NODE(CreateTableSpaceStmt, CreateTableSpaceStmt, create_table_space_stmt, CREATE_TABLE_SPACE_STMT, CreateTableSpaceStmt, create_table_space_stmt); +case T_ReplicaIdentityStmt: + OUT_NODE(ReplicaIdentityStmt, ReplicaIdentityStmt, replica_identity_stmt, REPLICA_IDENTITY_STMT, ReplicaIdentityStmt, replica_identity_stmt); break; -case T_DropTableSpaceStmt: - OUT_NODE(DropTableSpaceStmt, DropTableSpaceStmt, drop_table_space_stmt, DROP_TABLE_SPACE_STMT, DropTableSpaceStmt, drop_table_space_stmt); +case T_AlterTableCmd: + OUT_NODE(AlterTableCmd, AlterTableCmd, alter_table_cmd, ALTER_TABLE_CMD, AlterTableCmd, alter_table_cmd); break; -case T_AlterObjectDependsStmt: - OUT_NODE(AlterObjectDependsStmt, AlterObjectDependsStmt, alter_object_depends_stmt, ALTER_OBJECT_DEPENDS_STMT, AlterObjectDependsStmt, alter_object_depends_stmt); +case T_AlterCollationStmt: + OUT_NODE(AlterCollationStmt, AlterCollationStmt, alter_collation_stmt, ALTER_COLLATION_STMT, AlterCollationStmt, alter_collation_stmt); break; -case T_AlterObjectSchemaStmt: - OUT_NODE(AlterObjectSchemaStmt, AlterObjectSchemaStmt, alter_object_schema_stmt, ALTER_OBJECT_SCHEMA_STMT, AlterObjectSchemaStmt, alter_object_schema_stmt); +case T_AlterDomainStmt: + OUT_NODE(AlterDomainStmt, AlterDomainStmt, alter_domain_stmt, ALTER_DOMAIN_STMT, AlterDomainStmt, alter_domain_stmt); break; -case T_AlterOwnerStmt: - OUT_NODE(AlterOwnerStmt, AlterOwnerStmt, alter_owner_stmt, ALTER_OWNER_STMT, AlterOwnerStmt, alter_owner_stmt); +case T_GrantStmt: + OUT_NODE(GrantStmt, GrantStmt, grant_stmt, GRANT_STMT, GrantStmt, grant_stmt); break; -case T_AlterOperatorStmt: - OUT_NODE(AlterOperatorStmt, AlterOperatorStmt, alter_operator_stmt, ALTER_OPERATOR_STMT, AlterOperatorStmt, alter_operator_stmt); +case T_ObjectWithArgs: + OUT_NODE(ObjectWithArgs, ObjectWithArgs, object_with_args, OBJECT_WITH_ARGS, ObjectWithArgs, object_with_args); break; -case T_AlterTypeStmt: - OUT_NODE(AlterTypeStmt, AlterTypeStmt, alter_type_stmt, ALTER_TYPE_STMT, AlterTypeStmt, alter_type_stmt); +case T_AccessPriv: + OUT_NODE(AccessPriv, AccessPriv, access_priv, ACCESS_PRIV, AccessPriv, access_priv); break; -case T_DropOwnedStmt: - OUT_NODE(DropOwnedStmt, DropOwnedStmt, drop_owned_stmt, DROP_OWNED_STMT, DropOwnedStmt, drop_owned_stmt); +case T_GrantRoleStmt: + OUT_NODE(GrantRoleStmt, GrantRoleStmt, grant_role_stmt, GRANT_ROLE_STMT, GrantRoleStmt, grant_role_stmt); break; -case T_ReassignOwnedStmt: - OUT_NODE(ReassignOwnedStmt, ReassignOwnedStmt, reassign_owned_stmt, REASSIGN_OWNED_STMT, ReassignOwnedStmt, reassign_owned_stmt); +case T_AlterDefaultPrivilegesStmt: + OUT_NODE(AlterDefaultPrivilegesStmt, AlterDefaultPrivilegesStmt, alter_default_privileges_stmt, ALTER_DEFAULT_PRIVILEGES_STMT, AlterDefaultPrivilegesStmt, alter_default_privileges_stmt); break; -case T_CompositeTypeStmt: - OUT_NODE(CompositeTypeStmt, CompositeTypeStmt, composite_type_stmt, COMPOSITE_TYPE_STMT, CompositeTypeStmt, composite_type_stmt); +case T_CopyStmt: + OUT_NODE(CopyStmt, CopyStmt, copy_stmt, COPY_STMT, CopyStmt, copy_stmt); break; -case T_CreateEnumStmt: - OUT_NODE(CreateEnumStmt, CreateEnumStmt, create_enum_stmt, CREATE_ENUM_STMT, CreateEnumStmt, create_enum_stmt); +case T_VariableSetStmt: + OUT_NODE(VariableSetStmt, VariableSetStmt, variable_set_stmt, VARIABLE_SET_STMT, VariableSetStmt, variable_set_stmt); break; -case T_CreateRangeStmt: - OUT_NODE(CreateRangeStmt, CreateRangeStmt, create_range_stmt, CREATE_RANGE_STMT, CreateRangeStmt, create_range_stmt); +case T_VariableShowStmt: + OUT_NODE(VariableShowStmt, VariableShowStmt, variable_show_stmt, VARIABLE_SHOW_STMT, VariableShowStmt, variable_show_stmt); break; -case T_AlterEnumStmt: - OUT_NODE(AlterEnumStmt, AlterEnumStmt, alter_enum_stmt, ALTER_ENUM_STMT, AlterEnumStmt, alter_enum_stmt); +case T_CreateStmt: + OUT_NODE(CreateStmt, CreateStmt, create_stmt, CREATE_STMT, CreateStmt, create_stmt); break; -case T_AlterTSDictionaryStmt: - OUT_NODE(AlterTSDictionaryStmt, AlterTSDictionaryStmt, alter_tsdictionary_stmt, ALTER_TSDICTIONARY_STMT, AlterTSDictionaryStmt, alter_tsdictionary_stmt); +case T_Constraint: + OUT_NODE(Constraint, Constraint, constraint, CONSTRAINT, Constraint, constraint); break; -case T_AlterTSConfigurationStmt: - OUT_NODE(AlterTSConfigurationStmt, AlterTSConfigurationStmt, alter_tsconfiguration_stmt, ALTER_TSCONFIGURATION_STMT, AlterTSConfigurationStmt, alter_tsconfiguration_stmt); +case T_CreateTableSpaceStmt: + OUT_NODE(CreateTableSpaceStmt, CreateTableSpaceStmt, create_table_space_stmt, CREATE_TABLE_SPACE_STMT, CreateTableSpaceStmt, create_table_space_stmt); + break; +case T_DropTableSpaceStmt: + OUT_NODE(DropTableSpaceStmt, DropTableSpaceStmt, drop_table_space_stmt, DROP_TABLE_SPACE_STMT, DropTableSpaceStmt, drop_table_space_stmt); + break; +case T_AlterTableSpaceOptionsStmt: + OUT_NODE(AlterTableSpaceOptionsStmt, AlterTableSpaceOptionsStmt, alter_table_space_options_stmt, ALTER_TABLE_SPACE_OPTIONS_STMT, AlterTableSpaceOptionsStmt, alter_table_space_options_stmt); + break; +case T_AlterTableMoveAllStmt: + OUT_NODE(AlterTableMoveAllStmt, AlterTableMoveAllStmt, alter_table_move_all_stmt, ALTER_TABLE_MOVE_ALL_STMT, AlterTableMoveAllStmt, alter_table_move_all_stmt); + break; +case T_CreateExtensionStmt: + OUT_NODE(CreateExtensionStmt, CreateExtensionStmt, create_extension_stmt, CREATE_EXTENSION_STMT, CreateExtensionStmt, create_extension_stmt); + break; +case T_AlterExtensionStmt: + OUT_NODE(AlterExtensionStmt, AlterExtensionStmt, alter_extension_stmt, ALTER_EXTENSION_STMT, AlterExtensionStmt, alter_extension_stmt); + break; +case T_AlterExtensionContentsStmt: + OUT_NODE(AlterExtensionContentsStmt, AlterExtensionContentsStmt, alter_extension_contents_stmt, ALTER_EXTENSION_CONTENTS_STMT, AlterExtensionContentsStmt, alter_extension_contents_stmt); break; case T_CreateFdwStmt: OUT_NODE(CreateFdwStmt, CreateFdwStmt, create_fdw_stmt, CREATE_FDW_STMT, CreateFdwStmt, create_fdw_stmt); @@ -450,6 +477,9 @@ case T_CreateForeignServerStmt: case T_AlterForeignServerStmt: OUT_NODE(AlterForeignServerStmt, AlterForeignServerStmt, alter_foreign_server_stmt, ALTER_FOREIGN_SERVER_STMT, AlterForeignServerStmt, alter_foreign_server_stmt); break; +case T_CreateForeignTableStmt: + OUT_NODE(CreateForeignTableStmt, CreateForeignTableStmt, create_foreign_table_stmt, CREATE_FOREIGN_TABLE_STMT, CreateForeignTableStmt, create_foreign_table_stmt); + break; case T_CreateUserMappingStmt: OUT_NODE(CreateUserMappingStmt, CreateUserMappingStmt, create_user_mapping_stmt, CREATE_USER_MAPPING_STMT, CreateUserMappingStmt, create_user_mapping_stmt); break; @@ -459,29 +489,20 @@ case T_AlterUserMappingStmt: case T_DropUserMappingStmt: OUT_NODE(DropUserMappingStmt, DropUserMappingStmt, drop_user_mapping_stmt, DROP_USER_MAPPING_STMT, DropUserMappingStmt, drop_user_mapping_stmt); break; -case T_AlterTableSpaceOptionsStmt: - OUT_NODE(AlterTableSpaceOptionsStmt, AlterTableSpaceOptionsStmt, alter_table_space_options_stmt, ALTER_TABLE_SPACE_OPTIONS_STMT, AlterTableSpaceOptionsStmt, alter_table_space_options_stmt); - break; -case T_AlterTableMoveAllStmt: - OUT_NODE(AlterTableMoveAllStmt, AlterTableMoveAllStmt, alter_table_move_all_stmt, ALTER_TABLE_MOVE_ALL_STMT, AlterTableMoveAllStmt, alter_table_move_all_stmt); - break; -case T_SecLabelStmt: - OUT_NODE(SecLabelStmt, SecLabelStmt, sec_label_stmt, SEC_LABEL_STMT, SecLabelStmt, sec_label_stmt); - break; -case T_CreateForeignTableStmt: - OUT_NODE(CreateForeignTableStmt, CreateForeignTableStmt, create_foreign_table_stmt, CREATE_FOREIGN_TABLE_STMT, CreateForeignTableStmt, create_foreign_table_stmt); - break; case T_ImportForeignSchemaStmt: OUT_NODE(ImportForeignSchemaStmt, ImportForeignSchemaStmt, import_foreign_schema_stmt, IMPORT_FOREIGN_SCHEMA_STMT, ImportForeignSchemaStmt, import_foreign_schema_stmt); break; -case T_CreateExtensionStmt: - OUT_NODE(CreateExtensionStmt, CreateExtensionStmt, create_extension_stmt, CREATE_EXTENSION_STMT, CreateExtensionStmt, create_extension_stmt); +case T_CreatePolicyStmt: + OUT_NODE(CreatePolicyStmt, CreatePolicyStmt, create_policy_stmt, CREATE_POLICY_STMT, CreatePolicyStmt, create_policy_stmt); break; -case T_AlterExtensionStmt: - OUT_NODE(AlterExtensionStmt, AlterExtensionStmt, alter_extension_stmt, ALTER_EXTENSION_STMT, AlterExtensionStmt, alter_extension_stmt); +case T_AlterPolicyStmt: + OUT_NODE(AlterPolicyStmt, AlterPolicyStmt, alter_policy_stmt, ALTER_POLICY_STMT, AlterPolicyStmt, alter_policy_stmt); break; -case T_AlterExtensionContentsStmt: - OUT_NODE(AlterExtensionContentsStmt, AlterExtensionContentsStmt, alter_extension_contents_stmt, ALTER_EXTENSION_CONTENTS_STMT, AlterExtensionContentsStmt, alter_extension_contents_stmt); +case T_CreateAmStmt: + OUT_NODE(CreateAmStmt, CreateAmStmt, create_am_stmt, CREATE_AM_STMT, CreateAmStmt, create_am_stmt); + break; +case T_CreateTrigStmt: + OUT_NODE(CreateTrigStmt, CreateTrigStmt, create_trig_stmt, CREATE_TRIG_STMT, CreateTrigStmt, create_trig_stmt); break; case T_CreateEventTrigStmt: OUT_NODE(CreateEventTrigStmt, CreateEventTrigStmt, create_event_trig_stmt, CREATE_EVENT_TRIG_STMT, CreateEventTrigStmt, create_event_trig_stmt); @@ -489,228 +510,249 @@ case T_CreateEventTrigStmt: case T_AlterEventTrigStmt: OUT_NODE(AlterEventTrigStmt, AlterEventTrigStmt, alter_event_trig_stmt, ALTER_EVENT_TRIG_STMT, AlterEventTrigStmt, alter_event_trig_stmt); break; -case T_RefreshMatViewStmt: - OUT_NODE(RefreshMatViewStmt, RefreshMatViewStmt, refresh_mat_view_stmt, REFRESH_MAT_VIEW_STMT, RefreshMatViewStmt, refresh_mat_view_stmt); +case T_CreatePLangStmt: + OUT_NODE(CreatePLangStmt, CreatePLangStmt, create_plang_stmt, CREATE_PLANG_STMT, CreatePLangStmt, create_plang_stmt); break; -case T_ReplicaIdentityStmt: - OUT_NODE(ReplicaIdentityStmt, ReplicaIdentityStmt, replica_identity_stmt, REPLICA_IDENTITY_STMT, ReplicaIdentityStmt, replica_identity_stmt); +case T_CreateRoleStmt: + OUT_NODE(CreateRoleStmt, CreateRoleStmt, create_role_stmt, CREATE_ROLE_STMT, CreateRoleStmt, create_role_stmt); break; -case T_AlterSystemStmt: - OUT_NODE(AlterSystemStmt, AlterSystemStmt, alter_system_stmt, ALTER_SYSTEM_STMT, AlterSystemStmt, alter_system_stmt); +case T_AlterRoleStmt: + OUT_NODE(AlterRoleStmt, AlterRoleStmt, alter_role_stmt, ALTER_ROLE_STMT, AlterRoleStmt, alter_role_stmt); break; -case T_CreatePolicyStmt: - OUT_NODE(CreatePolicyStmt, CreatePolicyStmt, create_policy_stmt, CREATE_POLICY_STMT, CreatePolicyStmt, create_policy_stmt); +case T_AlterRoleSetStmt: + OUT_NODE(AlterRoleSetStmt, AlterRoleSetStmt, alter_role_set_stmt, ALTER_ROLE_SET_STMT, AlterRoleSetStmt, alter_role_set_stmt); break; -case T_AlterPolicyStmt: - OUT_NODE(AlterPolicyStmt, AlterPolicyStmt, alter_policy_stmt, ALTER_POLICY_STMT, AlterPolicyStmt, alter_policy_stmt); +case T_DropRoleStmt: + OUT_NODE(DropRoleStmt, DropRoleStmt, drop_role_stmt, DROP_ROLE_STMT, DropRoleStmt, drop_role_stmt); break; -case T_CreateTransformStmt: - OUT_NODE(CreateTransformStmt, CreateTransformStmt, create_transform_stmt, CREATE_TRANSFORM_STMT, CreateTransformStmt, create_transform_stmt); +case T_CreateSeqStmt: + OUT_NODE(CreateSeqStmt, CreateSeqStmt, create_seq_stmt, CREATE_SEQ_STMT, CreateSeqStmt, create_seq_stmt); break; -case T_CreateAmStmt: - OUT_NODE(CreateAmStmt, CreateAmStmt, create_am_stmt, CREATE_AM_STMT, CreateAmStmt, create_am_stmt); +case T_AlterSeqStmt: + OUT_NODE(AlterSeqStmt, AlterSeqStmt, alter_seq_stmt, ALTER_SEQ_STMT, AlterSeqStmt, alter_seq_stmt); break; -case T_CreatePublicationStmt: - OUT_NODE(CreatePublicationStmt, CreatePublicationStmt, create_publication_stmt, CREATE_PUBLICATION_STMT, CreatePublicationStmt, create_publication_stmt); +case T_DefineStmt: + OUT_NODE(DefineStmt, DefineStmt, define_stmt, DEFINE_STMT, DefineStmt, define_stmt); break; -case T_AlterPublicationStmt: - OUT_NODE(AlterPublicationStmt, AlterPublicationStmt, alter_publication_stmt, ALTER_PUBLICATION_STMT, AlterPublicationStmt, alter_publication_stmt); +case T_CreateDomainStmt: + OUT_NODE(CreateDomainStmt, CreateDomainStmt, create_domain_stmt, CREATE_DOMAIN_STMT, CreateDomainStmt, create_domain_stmt); break; -case T_CreateSubscriptionStmt: - OUT_NODE(CreateSubscriptionStmt, CreateSubscriptionStmt, create_subscription_stmt, CREATE_SUBSCRIPTION_STMT, CreateSubscriptionStmt, create_subscription_stmt); +case T_CreateOpClassStmt: + OUT_NODE(CreateOpClassStmt, CreateOpClassStmt, create_op_class_stmt, CREATE_OP_CLASS_STMT, CreateOpClassStmt, create_op_class_stmt); break; -case T_AlterSubscriptionStmt: - OUT_NODE(AlterSubscriptionStmt, AlterSubscriptionStmt, alter_subscription_stmt, ALTER_SUBSCRIPTION_STMT, AlterSubscriptionStmt, alter_subscription_stmt); +case T_CreateOpClassItem: + OUT_NODE(CreateOpClassItem, CreateOpClassItem, create_op_class_item, CREATE_OP_CLASS_ITEM, CreateOpClassItem, create_op_class_item); break; -case T_DropSubscriptionStmt: - OUT_NODE(DropSubscriptionStmt, DropSubscriptionStmt, drop_subscription_stmt, DROP_SUBSCRIPTION_STMT, DropSubscriptionStmt, drop_subscription_stmt); +case T_CreateOpFamilyStmt: + OUT_NODE(CreateOpFamilyStmt, CreateOpFamilyStmt, create_op_family_stmt, CREATE_OP_FAMILY_STMT, CreateOpFamilyStmt, create_op_family_stmt); break; -case T_CreateStatsStmt: - OUT_NODE(CreateStatsStmt, CreateStatsStmt, create_stats_stmt, CREATE_STATS_STMT, CreateStatsStmt, create_stats_stmt); +case T_AlterOpFamilyStmt: + OUT_NODE(AlterOpFamilyStmt, AlterOpFamilyStmt, alter_op_family_stmt, ALTER_OP_FAMILY_STMT, AlterOpFamilyStmt, alter_op_family_stmt); break; -case T_AlterCollationStmt: - OUT_NODE(AlterCollationStmt, AlterCollationStmt, alter_collation_stmt, ALTER_COLLATION_STMT, AlterCollationStmt, alter_collation_stmt); +case T_DropStmt: + OUT_NODE(DropStmt, DropStmt, drop_stmt, DROP_STMT, DropStmt, drop_stmt); break; -case T_CallStmt: - OUT_NODE(CallStmt, CallStmt, call_stmt, CALL_STMT, CallStmt, call_stmt); +case T_TruncateStmt: + OUT_NODE(TruncateStmt, TruncateStmt, truncate_stmt, TRUNCATE_STMT, TruncateStmt, truncate_stmt); break; -case T_AlterStatsStmt: - OUT_NODE(AlterStatsStmt, AlterStatsStmt, alter_stats_stmt, ALTER_STATS_STMT, AlterStatsStmt, alter_stats_stmt); +case T_CommentStmt: + OUT_NODE(CommentStmt, CommentStmt, comment_stmt, COMMENT_STMT, CommentStmt, comment_stmt); break; -case T_A_Expr: - OUT_NODE(A_Expr, AExpr, a__expr, A_EXPR, A_Expr, a_expr); +case T_SecLabelStmt: + OUT_NODE(SecLabelStmt, SecLabelStmt, sec_label_stmt, SEC_LABEL_STMT, SecLabelStmt, sec_label_stmt); break; -case T_ColumnRef: - OUT_NODE(ColumnRef, ColumnRef, column_ref, COLUMN_REF, ColumnRef, column_ref); +case T_DeclareCursorStmt: + OUT_NODE(DeclareCursorStmt, DeclareCursorStmt, declare_cursor_stmt, DECLARE_CURSOR_STMT, DeclareCursorStmt, declare_cursor_stmt); break; -case T_ParamRef: - OUT_NODE(ParamRef, ParamRef, param_ref, PARAM_REF, ParamRef, param_ref); +case T_ClosePortalStmt: + OUT_NODE(ClosePortalStmt, ClosePortalStmt, close_portal_stmt, CLOSE_PORTAL_STMT, ClosePortalStmt, close_portal_stmt); break; -case T_FuncCall: - OUT_NODE(FuncCall, FuncCall, func_call, FUNC_CALL, FuncCall, func_call); +case T_FetchStmt: + OUT_NODE(FetchStmt, FetchStmt, fetch_stmt, FETCH_STMT, FetchStmt, fetch_stmt); break; -case T_A_Star: - OUT_NODE(A_Star, AStar, a__star, A_STAR, A_Star, a_star); +case T_IndexStmt: + OUT_NODE(IndexStmt, IndexStmt, index_stmt, INDEX_STMT, IndexStmt, index_stmt); break; -case T_A_Indices: - OUT_NODE(A_Indices, AIndices, a__indices, A_INDICES, A_Indices, a_indices); +case T_CreateStatsStmt: + OUT_NODE(CreateStatsStmt, CreateStatsStmt, create_stats_stmt, CREATE_STATS_STMT, CreateStatsStmt, create_stats_stmt); break; -case T_A_Indirection: - OUT_NODE(A_Indirection, AIndirection, a__indirection, A_INDIRECTION, A_Indirection, a_indirection); +case T_StatsElem: + OUT_NODE(StatsElem, StatsElem, stats_elem, STATS_ELEM, StatsElem, stats_elem); break; -case T_A_ArrayExpr: - OUT_NODE(A_ArrayExpr, AArrayExpr, a__array_expr, A_ARRAY_EXPR, A_ArrayExpr, a_array_expr); +case T_AlterStatsStmt: + OUT_NODE(AlterStatsStmt, AlterStatsStmt, alter_stats_stmt, ALTER_STATS_STMT, AlterStatsStmt, alter_stats_stmt); break; -case T_ResTarget: - OUT_NODE(ResTarget, ResTarget, res_target, RES_TARGET, ResTarget, res_target); +case T_CreateFunctionStmt: + OUT_NODE(CreateFunctionStmt, CreateFunctionStmt, create_function_stmt, CREATE_FUNCTION_STMT, CreateFunctionStmt, create_function_stmt); break; -case T_MultiAssignRef: - OUT_NODE(MultiAssignRef, MultiAssignRef, multi_assign_ref, MULTI_ASSIGN_REF, MultiAssignRef, multi_assign_ref); +case T_FunctionParameter: + OUT_NODE(FunctionParameter, FunctionParameter, function_parameter, FUNCTION_PARAMETER, FunctionParameter, function_parameter); break; -case T_TypeCast: - OUT_NODE(TypeCast, TypeCast, type_cast, TYPE_CAST, TypeCast, type_cast); +case T_AlterFunctionStmt: + OUT_NODE(AlterFunctionStmt, AlterFunctionStmt, alter_function_stmt, ALTER_FUNCTION_STMT, AlterFunctionStmt, alter_function_stmt); break; -case T_CollateClause: - OUT_NODE(CollateClause, CollateClause, collate_clause, COLLATE_CLAUSE, CollateClause, collate_clause); +case T_DoStmt: + OUT_NODE(DoStmt, DoStmt, do_stmt, DO_STMT, DoStmt, do_stmt); break; -case T_SortBy: - OUT_NODE(SortBy, SortBy, sort_by, SORT_BY, SortBy, sort_by); +case T_InlineCodeBlock: + OUT_NODE(InlineCodeBlock, InlineCodeBlock, inline_code_block, INLINE_CODE_BLOCK, InlineCodeBlock, inline_code_block); break; -case T_WindowDef: - OUT_NODE(WindowDef, WindowDef, window_def, WINDOW_DEF, WindowDef, window_def); +case T_CallStmt: + OUT_NODE(CallStmt, CallStmt, call_stmt, CALL_STMT, CallStmt, call_stmt); break; -case T_RangeSubselect: - OUT_NODE(RangeSubselect, RangeSubselect, range_subselect, RANGE_SUBSELECT, RangeSubselect, range_subselect); +case T_CallContext: + OUT_NODE(CallContext, CallContext, call_context, CALL_CONTEXT, CallContext, call_context); break; -case T_RangeFunction: - OUT_NODE(RangeFunction, RangeFunction, range_function, RANGE_FUNCTION, RangeFunction, range_function); +case T_RenameStmt: + OUT_NODE(RenameStmt, RenameStmt, rename_stmt, RENAME_STMT, RenameStmt, rename_stmt); break; -case T_RangeTableSample: - OUT_NODE(RangeTableSample, RangeTableSample, range_table_sample, RANGE_TABLE_SAMPLE, RangeTableSample, range_table_sample); +case T_AlterObjectDependsStmt: + OUT_NODE(AlterObjectDependsStmt, AlterObjectDependsStmt, alter_object_depends_stmt, ALTER_OBJECT_DEPENDS_STMT, AlterObjectDependsStmt, alter_object_depends_stmt); break; -case T_RangeTableFunc: - OUT_NODE(RangeTableFunc, RangeTableFunc, range_table_func, RANGE_TABLE_FUNC, RangeTableFunc, range_table_func); +case T_AlterObjectSchemaStmt: + OUT_NODE(AlterObjectSchemaStmt, AlterObjectSchemaStmt, alter_object_schema_stmt, ALTER_OBJECT_SCHEMA_STMT, AlterObjectSchemaStmt, alter_object_schema_stmt); break; -case T_RangeTableFuncCol: - OUT_NODE(RangeTableFuncCol, RangeTableFuncCol, range_table_func_col, RANGE_TABLE_FUNC_COL, RangeTableFuncCol, range_table_func_col); +case T_AlterOwnerStmt: + OUT_NODE(AlterOwnerStmt, AlterOwnerStmt, alter_owner_stmt, ALTER_OWNER_STMT, AlterOwnerStmt, alter_owner_stmt); break; -case T_TypeName: - OUT_NODE(TypeName, TypeName, type_name, TYPE_NAME, TypeName, type_name); +case T_AlterOperatorStmt: + OUT_NODE(AlterOperatorStmt, AlterOperatorStmt, alter_operator_stmt, ALTER_OPERATOR_STMT, AlterOperatorStmt, alter_operator_stmt); break; -case T_ColumnDef: - OUT_NODE(ColumnDef, ColumnDef, column_def, COLUMN_DEF, ColumnDef, column_def); +case T_AlterTypeStmt: + OUT_NODE(AlterTypeStmt, AlterTypeStmt, alter_type_stmt, ALTER_TYPE_STMT, AlterTypeStmt, alter_type_stmt); break; -case T_IndexElem: - OUT_NODE(IndexElem, IndexElem, index_elem, INDEX_ELEM, IndexElem, index_elem); +case T_RuleStmt: + OUT_NODE(RuleStmt, RuleStmt, rule_stmt, RULE_STMT, RuleStmt, rule_stmt); break; -case T_StatsElem: - OUT_NODE(StatsElem, StatsElem, stats_elem, STATS_ELEM, StatsElem, stats_elem); +case T_NotifyStmt: + OUT_NODE(NotifyStmt, NotifyStmt, notify_stmt, NOTIFY_STMT, NotifyStmt, notify_stmt); break; -case T_Constraint: - OUT_NODE(Constraint, Constraint, constraint, CONSTRAINT, Constraint, constraint); +case T_ListenStmt: + OUT_NODE(ListenStmt, ListenStmt, listen_stmt, LISTEN_STMT, ListenStmt, listen_stmt); break; -case T_DefElem: - OUT_NODE(DefElem, DefElem, def_elem, DEF_ELEM, DefElem, def_elem); +case T_UnlistenStmt: + OUT_NODE(UnlistenStmt, UnlistenStmt, unlisten_stmt, UNLISTEN_STMT, UnlistenStmt, unlisten_stmt); break; -case T_RangeTblEntry: - OUT_NODE(RangeTblEntry, RangeTblEntry, range_tbl_entry, RANGE_TBL_ENTRY, RangeTblEntry, range_tbl_entry); +case T_TransactionStmt: + OUT_NODE(TransactionStmt, TransactionStmt, transaction_stmt, TRANSACTION_STMT, TransactionStmt, transaction_stmt); break; -case T_RangeTblFunction: - OUT_NODE(RangeTblFunction, RangeTblFunction, range_tbl_function, RANGE_TBL_FUNCTION, RangeTblFunction, range_tbl_function); +case T_CompositeTypeStmt: + OUT_NODE(CompositeTypeStmt, CompositeTypeStmt, composite_type_stmt, COMPOSITE_TYPE_STMT, CompositeTypeStmt, composite_type_stmt); break; -case T_TableSampleClause: - OUT_NODE(TableSampleClause, TableSampleClause, table_sample_clause, TABLE_SAMPLE_CLAUSE, TableSampleClause, table_sample_clause); +case T_CreateEnumStmt: + OUT_NODE(CreateEnumStmt, CreateEnumStmt, create_enum_stmt, CREATE_ENUM_STMT, CreateEnumStmt, create_enum_stmt); break; -case T_WithCheckOption: - OUT_NODE(WithCheckOption, WithCheckOption, with_check_option, WITH_CHECK_OPTION, WithCheckOption, with_check_option); +case T_CreateRangeStmt: + OUT_NODE(CreateRangeStmt, CreateRangeStmt, create_range_stmt, CREATE_RANGE_STMT, CreateRangeStmt, create_range_stmt); break; -case T_SortGroupClause: - OUT_NODE(SortGroupClause, SortGroupClause, sort_group_clause, SORT_GROUP_CLAUSE, SortGroupClause, sort_group_clause); +case T_AlterEnumStmt: + OUT_NODE(AlterEnumStmt, AlterEnumStmt, alter_enum_stmt, ALTER_ENUM_STMT, AlterEnumStmt, alter_enum_stmt); break; -case T_GroupingSet: - OUT_NODE(GroupingSet, GroupingSet, grouping_set, GROUPING_SET, GroupingSet, grouping_set); +case T_ViewStmt: + OUT_NODE(ViewStmt, ViewStmt, view_stmt, VIEW_STMT, ViewStmt, view_stmt); break; -case T_WindowClause: - OUT_NODE(WindowClause, WindowClause, window_clause, WINDOW_CLAUSE, WindowClause, window_clause); +case T_LoadStmt: + OUT_NODE(LoadStmt, LoadStmt, load_stmt, LOAD_STMT, LoadStmt, load_stmt); break; -case T_ObjectWithArgs: - OUT_NODE(ObjectWithArgs, ObjectWithArgs, object_with_args, OBJECT_WITH_ARGS, ObjectWithArgs, object_with_args); +case T_CreatedbStmt: + OUT_NODE(CreatedbStmt, CreatedbStmt, createdb_stmt, CREATEDB_STMT, CreatedbStmt, createdb_stmt); break; -case T_AccessPriv: - OUT_NODE(AccessPriv, AccessPriv, access_priv, ACCESS_PRIV, AccessPriv, access_priv); +case T_AlterDatabaseStmt: + OUT_NODE(AlterDatabaseStmt, AlterDatabaseStmt, alter_database_stmt, ALTER_DATABASE_STMT, AlterDatabaseStmt, alter_database_stmt); break; -case T_CreateOpClassItem: - OUT_NODE(CreateOpClassItem, CreateOpClassItem, create_op_class_item, CREATE_OP_CLASS_ITEM, CreateOpClassItem, create_op_class_item); +case T_AlterDatabaseRefreshCollStmt: + OUT_NODE(AlterDatabaseRefreshCollStmt, AlterDatabaseRefreshCollStmt, alter_database_refresh_coll_stmt, ALTER_DATABASE_REFRESH_COLL_STMT, AlterDatabaseRefreshCollStmt, alter_database_refresh_coll_stmt); break; -case T_TableLikeClause: - OUT_NODE(TableLikeClause, TableLikeClause, table_like_clause, TABLE_LIKE_CLAUSE, TableLikeClause, table_like_clause); +case T_AlterDatabaseSetStmt: + OUT_NODE(AlterDatabaseSetStmt, AlterDatabaseSetStmt, alter_database_set_stmt, ALTER_DATABASE_SET_STMT, AlterDatabaseSetStmt, alter_database_set_stmt); break; -case T_FunctionParameter: - OUT_NODE(FunctionParameter, FunctionParameter, function_parameter, FUNCTION_PARAMETER, FunctionParameter, function_parameter); +case T_DropdbStmt: + OUT_NODE(DropdbStmt, DropdbStmt, dropdb_stmt, DROPDB_STMT, DropdbStmt, dropdb_stmt); break; -case T_LockingClause: - OUT_NODE(LockingClause, LockingClause, locking_clause, LOCKING_CLAUSE, LockingClause, locking_clause); +case T_AlterSystemStmt: + OUT_NODE(AlterSystemStmt, AlterSystemStmt, alter_system_stmt, ALTER_SYSTEM_STMT, AlterSystemStmt, alter_system_stmt); break; -case T_RowMarkClause: - OUT_NODE(RowMarkClause, RowMarkClause, row_mark_clause, ROW_MARK_CLAUSE, RowMarkClause, row_mark_clause); +case T_ClusterStmt: + OUT_NODE(ClusterStmt, ClusterStmt, cluster_stmt, CLUSTER_STMT, ClusterStmt, cluster_stmt); break; -case T_XmlSerialize: - OUT_NODE(XmlSerialize, XmlSerialize, xml_serialize, XML_SERIALIZE, XmlSerialize, xml_serialize); +case T_VacuumStmt: + OUT_NODE(VacuumStmt, VacuumStmt, vacuum_stmt, VACUUM_STMT, VacuumStmt, vacuum_stmt); break; -case T_WithClause: - OUT_NODE(WithClause, WithClause, with_clause, WITH_CLAUSE, WithClause, with_clause); +case T_VacuumRelation: + OUT_NODE(VacuumRelation, VacuumRelation, vacuum_relation, VACUUM_RELATION, VacuumRelation, vacuum_relation); break; -case T_InferClause: - OUT_NODE(InferClause, InferClause, infer_clause, INFER_CLAUSE, InferClause, infer_clause); +case T_ExplainStmt: + OUT_NODE(ExplainStmt, ExplainStmt, explain_stmt, EXPLAIN_STMT, ExplainStmt, explain_stmt); break; -case T_OnConflictClause: - OUT_NODE(OnConflictClause, OnConflictClause, on_conflict_clause, ON_CONFLICT_CLAUSE, OnConflictClause, on_conflict_clause); +case T_CreateTableAsStmt: + OUT_NODE(CreateTableAsStmt, CreateTableAsStmt, create_table_as_stmt, CREATE_TABLE_AS_STMT, CreateTableAsStmt, create_table_as_stmt); break; -case T_CTESearchClause: - OUT_NODE(CTESearchClause, CTESearchClause, ctesearch_clause, CTESEARCH_CLAUSE, CTESearchClause, ctesearch_clause); +case T_RefreshMatViewStmt: + OUT_NODE(RefreshMatViewStmt, RefreshMatViewStmt, refresh_mat_view_stmt, REFRESH_MAT_VIEW_STMT, RefreshMatViewStmt, refresh_mat_view_stmt); break; -case T_CTECycleClause: - OUT_NODE(CTECycleClause, CTECycleClause, ctecycle_clause, CTECYCLE_CLAUSE, CTECycleClause, ctecycle_clause); +case T_CheckPointStmt: + OUT_NODE(CheckPointStmt, CheckPointStmt, check_point_stmt, CHECK_POINT_STMT, CheckPointStmt, check_point_stmt); break; -case T_CommonTableExpr: - OUT_NODE(CommonTableExpr, CommonTableExpr, common_table_expr, COMMON_TABLE_EXPR, CommonTableExpr, common_table_expr); +case T_DiscardStmt: + OUT_NODE(DiscardStmt, DiscardStmt, discard_stmt, DISCARD_STMT, DiscardStmt, discard_stmt); break; -case T_MergeWhenClause: - OUT_NODE(MergeWhenClause, MergeWhenClause, merge_when_clause, MERGE_WHEN_CLAUSE, MergeWhenClause, merge_when_clause); +case T_LockStmt: + OUT_NODE(LockStmt, LockStmt, lock_stmt, LOCK_STMT, LockStmt, lock_stmt); break; -case T_RoleSpec: - OUT_NODE(RoleSpec, RoleSpec, role_spec, ROLE_SPEC, RoleSpec, role_spec); +case T_ConstraintsSetStmt: + OUT_NODE(ConstraintsSetStmt, ConstraintsSetStmt, constraints_set_stmt, CONSTRAINTS_SET_STMT, ConstraintsSetStmt, constraints_set_stmt); break; -case T_TriggerTransition: - OUT_NODE(TriggerTransition, TriggerTransition, trigger_transition, TRIGGER_TRANSITION, TriggerTransition, trigger_transition); +case T_ReindexStmt: + OUT_NODE(ReindexStmt, ReindexStmt, reindex_stmt, REINDEX_STMT, ReindexStmt, reindex_stmt); break; -case T_PartitionElem: - OUT_NODE(PartitionElem, PartitionElem, partition_elem, PARTITION_ELEM, PartitionElem, partition_elem); +case T_CreateConversionStmt: + OUT_NODE(CreateConversionStmt, CreateConversionStmt, create_conversion_stmt, CREATE_CONVERSION_STMT, CreateConversionStmt, create_conversion_stmt); break; -case T_PartitionSpec: - OUT_NODE(PartitionSpec, PartitionSpec, partition_spec, PARTITION_SPEC, PartitionSpec, partition_spec); +case T_CreateCastStmt: + OUT_NODE(CreateCastStmt, CreateCastStmt, create_cast_stmt, CREATE_CAST_STMT, CreateCastStmt, create_cast_stmt); break; -case T_PartitionBoundSpec: - OUT_NODE(PartitionBoundSpec, PartitionBoundSpec, partition_bound_spec, PARTITION_BOUND_SPEC, PartitionBoundSpec, partition_bound_spec); +case T_CreateTransformStmt: + OUT_NODE(CreateTransformStmt, CreateTransformStmt, create_transform_stmt, CREATE_TRANSFORM_STMT, CreateTransformStmt, create_transform_stmt); break; -case T_PartitionRangeDatum: - OUT_NODE(PartitionRangeDatum, PartitionRangeDatum, partition_range_datum, PARTITION_RANGE_DATUM, PartitionRangeDatum, partition_range_datum); +case T_PrepareStmt: + OUT_NODE(PrepareStmt, PrepareStmt, prepare_stmt, PREPARE_STMT, PrepareStmt, prepare_stmt); break; -case T_PartitionCmd: - OUT_NODE(PartitionCmd, PartitionCmd, partition_cmd, PARTITION_CMD, PartitionCmd, partition_cmd); +case T_ExecuteStmt: + OUT_NODE(ExecuteStmt, ExecuteStmt, execute_stmt, EXECUTE_STMT, ExecuteStmt, execute_stmt); break; -case T_VacuumRelation: - OUT_NODE(VacuumRelation, VacuumRelation, vacuum_relation, VACUUM_RELATION, VacuumRelation, vacuum_relation); +case T_DeallocateStmt: + OUT_NODE(DeallocateStmt, DeallocateStmt, deallocate_stmt, DEALLOCATE_STMT, DeallocateStmt, deallocate_stmt); break; -case T_PublicationObjSpec: - OUT_NODE(PublicationObjSpec, PublicationObjSpec, publication_obj_spec, PUBLICATION_OBJ_SPEC, PublicationObjSpec, publication_obj_spec); +case T_DropOwnedStmt: + OUT_NODE(DropOwnedStmt, DropOwnedStmt, drop_owned_stmt, DROP_OWNED_STMT, DropOwnedStmt, drop_owned_stmt); + break; +case T_ReassignOwnedStmt: + OUT_NODE(ReassignOwnedStmt, ReassignOwnedStmt, reassign_owned_stmt, REASSIGN_OWNED_STMT, ReassignOwnedStmt, reassign_owned_stmt); + break; +case T_AlterTSDictionaryStmt: + OUT_NODE(AlterTSDictionaryStmt, AlterTSDictionaryStmt, alter_tsdictionary_stmt, ALTER_TSDICTIONARY_STMT, AlterTSDictionaryStmt, alter_tsdictionary_stmt); + break; +case T_AlterTSConfigurationStmt: + OUT_NODE(AlterTSConfigurationStmt, AlterTSConfigurationStmt, alter_tsconfiguration_stmt, ALTER_TSCONFIGURATION_STMT, AlterTSConfigurationStmt, alter_tsconfiguration_stmt); break; case T_PublicationTable: OUT_NODE(PublicationTable, PublicationTable, publication_table, PUBLICATION_TABLE, PublicationTable, publication_table); break; -case T_InlineCodeBlock: - OUT_NODE(InlineCodeBlock, InlineCodeBlock, inline_code_block, INLINE_CODE_BLOCK, InlineCodeBlock, inline_code_block); +case T_PublicationObjSpec: + OUT_NODE(PublicationObjSpec, PublicationObjSpec, publication_obj_spec, PUBLICATION_OBJ_SPEC, PublicationObjSpec, publication_obj_spec); break; -case T_CallContext: - OUT_NODE(CallContext, CallContext, call_context, CALL_CONTEXT, CallContext, call_context); +case T_CreatePublicationStmt: + OUT_NODE(CreatePublicationStmt, CreatePublicationStmt, create_publication_stmt, CREATE_PUBLICATION_STMT, CreatePublicationStmt, create_publication_stmt); + break; +case T_AlterPublicationStmt: + OUT_NODE(AlterPublicationStmt, AlterPublicationStmt, alter_publication_stmt, ALTER_PUBLICATION_STMT, AlterPublicationStmt, alter_publication_stmt); + break; +case T_CreateSubscriptionStmt: + OUT_NODE(CreateSubscriptionStmt, CreateSubscriptionStmt, create_subscription_stmt, CREATE_SUBSCRIPTION_STMT, CreateSubscriptionStmt, create_subscription_stmt); + break; +case T_AlterSubscriptionStmt: + OUT_NODE(AlterSubscriptionStmt, AlterSubscriptionStmt, alter_subscription_stmt, ALTER_SUBSCRIPTION_STMT, AlterSubscriptionStmt, alter_subscription_stmt); + break; +case T_DropSubscriptionStmt: + OUT_NODE(DropSubscriptionStmt, DropSubscriptionStmt, drop_subscription_stmt, DROP_SUBSCRIPTION_STMT, DropSubscriptionStmt, drop_subscription_stmt); break; diff --git a/src/pg_query_outfuncs_defs.c b/src/pg_query_outfuncs_defs.c index 9268de26..6e88bc20 100644 --- a/src/pg_query_outfuncs_defs.c +++ b/src/pg_query_outfuncs_defs.c @@ -3,6 +3,7 @@ static void _outAlias(OUT_TYPE(Alias, Alias) out_node, const Alias *node); static void _outRangeVar(OUT_TYPE(RangeVar, RangeVar) out_node, const RangeVar *node); static void _outTableFunc(OUT_TYPE(TableFunc, TableFunc) out_node, const TableFunc *node); +static void _outIntoClause(OUT_TYPE(IntoClause, IntoClause) out_node, const IntoClause *node); static void _outVar(OUT_TYPE(Var, Var) out_node, const Var *node); static void _outParam(OUT_TYPE(Param, Param) out_node, const Param *node); static void _outAggref(OUT_TYPE(Aggref, Aggref) out_node, const Aggref *node); @@ -36,6 +37,11 @@ static void _outCoalesceExpr(OUT_TYPE(CoalesceExpr, CoalesceExpr) out_node, cons static void _outMinMaxExpr(OUT_TYPE(MinMaxExpr, MinMaxExpr) out_node, const MinMaxExpr *node); static void _outSQLValueFunction(OUT_TYPE(SQLValueFunction, SQLValueFunction) out_node, const SQLValueFunction *node); static void _outXmlExpr(OUT_TYPE(XmlExpr, XmlExpr) out_node, const XmlExpr *node); +static void _outJsonFormat(OUT_TYPE(JsonFormat, JsonFormat) out_node, const JsonFormat *node); +static void _outJsonReturning(OUT_TYPE(JsonReturning, JsonReturning) out_node, const JsonReturning *node); +static void _outJsonValueExpr(OUT_TYPE(JsonValueExpr, JsonValueExpr) out_node, const JsonValueExpr *node); +static void _outJsonConstructorExpr(OUT_TYPE(JsonConstructorExpr, JsonConstructorExpr) out_node, const JsonConstructorExpr *node); +static void _outJsonIsPredicate(OUT_TYPE(JsonIsPredicate, JsonIsPredicate) out_node, const JsonIsPredicate *node); static void _outNullTest(OUT_TYPE(NullTest, NullTest) out_node, const NullTest *node); static void _outBooleanTest(OUT_TYPE(BooleanTest, BooleanTest) out_node, const BooleanTest *node); static void _outCoerceToDomain(OUT_TYPE(CoerceToDomain, CoerceToDomain) out_node, const CoerceToDomain *node); @@ -49,186 +55,194 @@ static void _outRangeTblRef(OUT_TYPE(RangeTblRef, RangeTblRef) out_node, const R static void _outJoinExpr(OUT_TYPE(JoinExpr, JoinExpr) out_node, const JoinExpr *node); static void _outFromExpr(OUT_TYPE(FromExpr, FromExpr) out_node, const FromExpr *node); static void _outOnConflictExpr(OUT_TYPE(OnConflictExpr, OnConflictExpr) out_node, const OnConflictExpr *node); -static void _outIntoClause(OUT_TYPE(IntoClause, IntoClause) out_node, const IntoClause *node); +static void _outQuery(OUT_TYPE(Query, Query) out_node, const Query *node); +static void _outTypeName(OUT_TYPE(TypeName, TypeName) out_node, const TypeName *node); +static void _outColumnRef(OUT_TYPE(ColumnRef, ColumnRef) out_node, const ColumnRef *node); +static void _outParamRef(OUT_TYPE(ParamRef, ParamRef) out_node, const ParamRef *node); +static void _outAExpr(OUT_TYPE(A_Expr, AExpr) out_node, const A_Expr *node); +static void _outTypeCast(OUT_TYPE(TypeCast, TypeCast) out_node, const TypeCast *node); +static void _outCollateClause(OUT_TYPE(CollateClause, CollateClause) out_node, const CollateClause *node); +static void _outRoleSpec(OUT_TYPE(RoleSpec, RoleSpec) out_node, const RoleSpec *node); +static void _outFuncCall(OUT_TYPE(FuncCall, FuncCall) out_node, const FuncCall *node); +static void _outAStar(OUT_TYPE(A_Star, AStar) out_node, const A_Star *node); +static void _outAIndices(OUT_TYPE(A_Indices, AIndices) out_node, const A_Indices *node); +static void _outAIndirection(OUT_TYPE(A_Indirection, AIndirection) out_node, const A_Indirection *node); +static void _outAArrayExpr(OUT_TYPE(A_ArrayExpr, AArrayExpr) out_node, const A_ArrayExpr *node); +static void _outResTarget(OUT_TYPE(ResTarget, ResTarget) out_node, const ResTarget *node); +static void _outMultiAssignRef(OUT_TYPE(MultiAssignRef, MultiAssignRef) out_node, const MultiAssignRef *node); +static void _outSortBy(OUT_TYPE(SortBy, SortBy) out_node, const SortBy *node); +static void _outWindowDef(OUT_TYPE(WindowDef, WindowDef) out_node, const WindowDef *node); +static void _outRangeSubselect(OUT_TYPE(RangeSubselect, RangeSubselect) out_node, const RangeSubselect *node); +static void _outRangeFunction(OUT_TYPE(RangeFunction, RangeFunction) out_node, const RangeFunction *node); +static void _outRangeTableFunc(OUT_TYPE(RangeTableFunc, RangeTableFunc) out_node, const RangeTableFunc *node); +static void _outRangeTableFuncCol(OUT_TYPE(RangeTableFuncCol, RangeTableFuncCol) out_node, const RangeTableFuncCol *node); +static void _outRangeTableSample(OUT_TYPE(RangeTableSample, RangeTableSample) out_node, const RangeTableSample *node); +static void _outColumnDef(OUT_TYPE(ColumnDef, ColumnDef) out_node, const ColumnDef *node); +static void _outTableLikeClause(OUT_TYPE(TableLikeClause, TableLikeClause) out_node, const TableLikeClause *node); +static void _outIndexElem(OUT_TYPE(IndexElem, IndexElem) out_node, const IndexElem *node); +static void _outDefElem(OUT_TYPE(DefElem, DefElem) out_node, const DefElem *node); +static void _outLockingClause(OUT_TYPE(LockingClause, LockingClause) out_node, const LockingClause *node); +static void _outXmlSerialize(OUT_TYPE(XmlSerialize, XmlSerialize) out_node, const XmlSerialize *node); +static void _outPartitionElem(OUT_TYPE(PartitionElem, PartitionElem) out_node, const PartitionElem *node); +static void _outPartitionSpec(OUT_TYPE(PartitionSpec, PartitionSpec) out_node, const PartitionSpec *node); +static void _outPartitionBoundSpec(OUT_TYPE(PartitionBoundSpec, PartitionBoundSpec) out_node, const PartitionBoundSpec *node); +static void _outPartitionRangeDatum(OUT_TYPE(PartitionRangeDatum, PartitionRangeDatum) out_node, const PartitionRangeDatum *node); +static void _outPartitionCmd(OUT_TYPE(PartitionCmd, PartitionCmd) out_node, const PartitionCmd *node); +static void _outRangeTblEntry(OUT_TYPE(RangeTblEntry, RangeTblEntry) out_node, const RangeTblEntry *node); +static void _outRTEPermissionInfo(OUT_TYPE(RTEPermissionInfo, RTEPermissionInfo) out_node, const RTEPermissionInfo *node); +static void _outRangeTblFunction(OUT_TYPE(RangeTblFunction, RangeTblFunction) out_node, const RangeTblFunction *node); +static void _outTableSampleClause(OUT_TYPE(TableSampleClause, TableSampleClause) out_node, const TableSampleClause *node); +static void _outWithCheckOption(OUT_TYPE(WithCheckOption, WithCheckOption) out_node, const WithCheckOption *node); +static void _outSortGroupClause(OUT_TYPE(SortGroupClause, SortGroupClause) out_node, const SortGroupClause *node); +static void _outGroupingSet(OUT_TYPE(GroupingSet, GroupingSet) out_node, const GroupingSet *node); +static void _outWindowClause(OUT_TYPE(WindowClause, WindowClause) out_node, const WindowClause *node); +static void _outRowMarkClause(OUT_TYPE(RowMarkClause, RowMarkClause) out_node, const RowMarkClause *node); +static void _outWithClause(OUT_TYPE(WithClause, WithClause) out_node, const WithClause *node); +static void _outInferClause(OUT_TYPE(InferClause, InferClause) out_node, const InferClause *node); +static void _outOnConflictClause(OUT_TYPE(OnConflictClause, OnConflictClause) out_node, const OnConflictClause *node); +static void _outCTESearchClause(OUT_TYPE(CTESearchClause, CTESearchClause) out_node, const CTESearchClause *node); +static void _outCTECycleClause(OUT_TYPE(CTECycleClause, CTECycleClause) out_node, const CTECycleClause *node); +static void _outCommonTableExpr(OUT_TYPE(CommonTableExpr, CommonTableExpr) out_node, const CommonTableExpr *node); +static void _outMergeWhenClause(OUT_TYPE(MergeWhenClause, MergeWhenClause) out_node, const MergeWhenClause *node); static void _outMergeAction(OUT_TYPE(MergeAction, MergeAction) out_node, const MergeAction *node); +static void _outTriggerTransition(OUT_TYPE(TriggerTransition, TriggerTransition) out_node, const TriggerTransition *node); +static void _outJsonOutput(OUT_TYPE(JsonOutput, JsonOutput) out_node, const JsonOutput *node); +static void _outJsonKeyValue(OUT_TYPE(JsonKeyValue, JsonKeyValue) out_node, const JsonKeyValue *node); +static void _outJsonObjectConstructor(OUT_TYPE(JsonObjectConstructor, JsonObjectConstructor) out_node, const JsonObjectConstructor *node); +static void _outJsonArrayConstructor(OUT_TYPE(JsonArrayConstructor, JsonArrayConstructor) out_node, const JsonArrayConstructor *node); +static void _outJsonArrayQueryConstructor(OUT_TYPE(JsonArrayQueryConstructor, JsonArrayQueryConstructor) out_node, const JsonArrayQueryConstructor *node); +static void _outJsonAggConstructor(OUT_TYPE(JsonAggConstructor, JsonAggConstructor) out_node, const JsonAggConstructor *node); +static void _outJsonObjectAgg(OUT_TYPE(JsonObjectAgg, JsonObjectAgg) out_node, const JsonObjectAgg *node); +static void _outJsonArrayAgg(OUT_TYPE(JsonArrayAgg, JsonArrayAgg) out_node, const JsonArrayAgg *node); static void _outRawStmt(OUT_TYPE(RawStmt, RawStmt) out_node, const RawStmt *node); -static void _outQuery(OUT_TYPE(Query, Query) out_node, const Query *node); static void _outInsertStmt(OUT_TYPE(InsertStmt, InsertStmt) out_node, const InsertStmt *node); static void _outDeleteStmt(OUT_TYPE(DeleteStmt, DeleteStmt) out_node, const DeleteStmt *node); static void _outUpdateStmt(OUT_TYPE(UpdateStmt, UpdateStmt) out_node, const UpdateStmt *node); static void _outMergeStmt(OUT_TYPE(MergeStmt, MergeStmt) out_node, const MergeStmt *node); static void _outSelectStmt(OUT_TYPE(SelectStmt, SelectStmt) out_node, const SelectStmt *node); +static void _outSetOperationStmt(OUT_TYPE(SetOperationStmt, SetOperationStmt) out_node, const SetOperationStmt *node); static void _outReturnStmt(OUT_TYPE(ReturnStmt, ReturnStmt) out_node, const ReturnStmt *node); static void _outPLAssignStmt(OUT_TYPE(PLAssignStmt, PLAssignStmt) out_node, const PLAssignStmt *node); +static void _outCreateSchemaStmt(OUT_TYPE(CreateSchemaStmt, CreateSchemaStmt) out_node, const CreateSchemaStmt *node); static void _outAlterTableStmt(OUT_TYPE(AlterTableStmt, AlterTableStmt) out_node, const AlterTableStmt *node); +static void _outReplicaIdentityStmt(OUT_TYPE(ReplicaIdentityStmt, ReplicaIdentityStmt) out_node, const ReplicaIdentityStmt *node); static void _outAlterTableCmd(OUT_TYPE(AlterTableCmd, AlterTableCmd) out_node, const AlterTableCmd *node); +static void _outAlterCollationStmt(OUT_TYPE(AlterCollationStmt, AlterCollationStmt) out_node, const AlterCollationStmt *node); static void _outAlterDomainStmt(OUT_TYPE(AlterDomainStmt, AlterDomainStmt) out_node, const AlterDomainStmt *node); -static void _outSetOperationStmt(OUT_TYPE(SetOperationStmt, SetOperationStmt) out_node, const SetOperationStmt *node); static void _outGrantStmt(OUT_TYPE(GrantStmt, GrantStmt) out_node, const GrantStmt *node); +static void _outObjectWithArgs(OUT_TYPE(ObjectWithArgs, ObjectWithArgs) out_node, const ObjectWithArgs *node); +static void _outAccessPriv(OUT_TYPE(AccessPriv, AccessPriv) out_node, const AccessPriv *node); static void _outGrantRoleStmt(OUT_TYPE(GrantRoleStmt, GrantRoleStmt) out_node, const GrantRoleStmt *node); static void _outAlterDefaultPrivilegesStmt(OUT_TYPE(AlterDefaultPrivilegesStmt, AlterDefaultPrivilegesStmt) out_node, const AlterDefaultPrivilegesStmt *node); -static void _outClosePortalStmt(OUT_TYPE(ClosePortalStmt, ClosePortalStmt) out_node, const ClosePortalStmt *node); -static void _outClusterStmt(OUT_TYPE(ClusterStmt, ClusterStmt) out_node, const ClusterStmt *node); static void _outCopyStmt(OUT_TYPE(CopyStmt, CopyStmt) out_node, const CopyStmt *node); +static void _outVariableSetStmt(OUT_TYPE(VariableSetStmt, VariableSetStmt) out_node, const VariableSetStmt *node); +static void _outVariableShowStmt(OUT_TYPE(VariableShowStmt, VariableShowStmt) out_node, const VariableShowStmt *node); static void _outCreateStmt(OUT_TYPE(CreateStmt, CreateStmt) out_node, const CreateStmt *node); +static void _outConstraint(OUT_TYPE(Constraint, Constraint) out_node, const Constraint *node); +static void _outCreateTableSpaceStmt(OUT_TYPE(CreateTableSpaceStmt, CreateTableSpaceStmt) out_node, const CreateTableSpaceStmt *node); +static void _outDropTableSpaceStmt(OUT_TYPE(DropTableSpaceStmt, DropTableSpaceStmt) out_node, const DropTableSpaceStmt *node); +static void _outAlterTableSpaceOptionsStmt(OUT_TYPE(AlterTableSpaceOptionsStmt, AlterTableSpaceOptionsStmt) out_node, const AlterTableSpaceOptionsStmt *node); +static void _outAlterTableMoveAllStmt(OUT_TYPE(AlterTableMoveAllStmt, AlterTableMoveAllStmt) out_node, const AlterTableMoveAllStmt *node); +static void _outCreateExtensionStmt(OUT_TYPE(CreateExtensionStmt, CreateExtensionStmt) out_node, const CreateExtensionStmt *node); +static void _outAlterExtensionStmt(OUT_TYPE(AlterExtensionStmt, AlterExtensionStmt) out_node, const AlterExtensionStmt *node); +static void _outAlterExtensionContentsStmt(OUT_TYPE(AlterExtensionContentsStmt, AlterExtensionContentsStmt) out_node, const AlterExtensionContentsStmt *node); +static void _outCreateFdwStmt(OUT_TYPE(CreateFdwStmt, CreateFdwStmt) out_node, const CreateFdwStmt *node); +static void _outAlterFdwStmt(OUT_TYPE(AlterFdwStmt, AlterFdwStmt) out_node, const AlterFdwStmt *node); +static void _outCreateForeignServerStmt(OUT_TYPE(CreateForeignServerStmt, CreateForeignServerStmt) out_node, const CreateForeignServerStmt *node); +static void _outAlterForeignServerStmt(OUT_TYPE(AlterForeignServerStmt, AlterForeignServerStmt) out_node, const AlterForeignServerStmt *node); +static void _outCreateForeignTableStmt(OUT_TYPE(CreateForeignTableStmt, CreateForeignTableStmt) out_node, const CreateForeignTableStmt *node); +static void _outCreateUserMappingStmt(OUT_TYPE(CreateUserMappingStmt, CreateUserMappingStmt) out_node, const CreateUserMappingStmt *node); +static void _outAlterUserMappingStmt(OUT_TYPE(AlterUserMappingStmt, AlterUserMappingStmt) out_node, const AlterUserMappingStmt *node); +static void _outDropUserMappingStmt(OUT_TYPE(DropUserMappingStmt, DropUserMappingStmt) out_node, const DropUserMappingStmt *node); +static void _outImportForeignSchemaStmt(OUT_TYPE(ImportForeignSchemaStmt, ImportForeignSchemaStmt) out_node, const ImportForeignSchemaStmt *node); +static void _outCreatePolicyStmt(OUT_TYPE(CreatePolicyStmt, CreatePolicyStmt) out_node, const CreatePolicyStmt *node); +static void _outAlterPolicyStmt(OUT_TYPE(AlterPolicyStmt, AlterPolicyStmt) out_node, const AlterPolicyStmt *node); +static void _outCreateAmStmt(OUT_TYPE(CreateAmStmt, CreateAmStmt) out_node, const CreateAmStmt *node); +static void _outCreateTrigStmt(OUT_TYPE(CreateTrigStmt, CreateTrigStmt) out_node, const CreateTrigStmt *node); +static void _outCreateEventTrigStmt(OUT_TYPE(CreateEventTrigStmt, CreateEventTrigStmt) out_node, const CreateEventTrigStmt *node); +static void _outAlterEventTrigStmt(OUT_TYPE(AlterEventTrigStmt, AlterEventTrigStmt) out_node, const AlterEventTrigStmt *node); +static void _outCreatePLangStmt(OUT_TYPE(CreatePLangStmt, CreatePLangStmt) out_node, const CreatePLangStmt *node); +static void _outCreateRoleStmt(OUT_TYPE(CreateRoleStmt, CreateRoleStmt) out_node, const CreateRoleStmt *node); +static void _outAlterRoleStmt(OUT_TYPE(AlterRoleStmt, AlterRoleStmt) out_node, const AlterRoleStmt *node); +static void _outAlterRoleSetStmt(OUT_TYPE(AlterRoleSetStmt, AlterRoleSetStmt) out_node, const AlterRoleSetStmt *node); +static void _outDropRoleStmt(OUT_TYPE(DropRoleStmt, DropRoleStmt) out_node, const DropRoleStmt *node); +static void _outCreateSeqStmt(OUT_TYPE(CreateSeqStmt, CreateSeqStmt) out_node, const CreateSeqStmt *node); +static void _outAlterSeqStmt(OUT_TYPE(AlterSeqStmt, AlterSeqStmt) out_node, const AlterSeqStmt *node); static void _outDefineStmt(OUT_TYPE(DefineStmt, DefineStmt) out_node, const DefineStmt *node); +static void _outCreateDomainStmt(OUT_TYPE(CreateDomainStmt, CreateDomainStmt) out_node, const CreateDomainStmt *node); +static void _outCreateOpClassStmt(OUT_TYPE(CreateOpClassStmt, CreateOpClassStmt) out_node, const CreateOpClassStmt *node); +static void _outCreateOpClassItem(OUT_TYPE(CreateOpClassItem, CreateOpClassItem) out_node, const CreateOpClassItem *node); +static void _outCreateOpFamilyStmt(OUT_TYPE(CreateOpFamilyStmt, CreateOpFamilyStmt) out_node, const CreateOpFamilyStmt *node); +static void _outAlterOpFamilyStmt(OUT_TYPE(AlterOpFamilyStmt, AlterOpFamilyStmt) out_node, const AlterOpFamilyStmt *node); static void _outDropStmt(OUT_TYPE(DropStmt, DropStmt) out_node, const DropStmt *node); static void _outTruncateStmt(OUT_TYPE(TruncateStmt, TruncateStmt) out_node, const TruncateStmt *node); static void _outCommentStmt(OUT_TYPE(CommentStmt, CommentStmt) out_node, const CommentStmt *node); +static void _outSecLabelStmt(OUT_TYPE(SecLabelStmt, SecLabelStmt) out_node, const SecLabelStmt *node); +static void _outDeclareCursorStmt(OUT_TYPE(DeclareCursorStmt, DeclareCursorStmt) out_node, const DeclareCursorStmt *node); +static void _outClosePortalStmt(OUT_TYPE(ClosePortalStmt, ClosePortalStmt) out_node, const ClosePortalStmt *node); static void _outFetchStmt(OUT_TYPE(FetchStmt, FetchStmt) out_node, const FetchStmt *node); static void _outIndexStmt(OUT_TYPE(IndexStmt, IndexStmt) out_node, const IndexStmt *node); +static void _outCreateStatsStmt(OUT_TYPE(CreateStatsStmt, CreateStatsStmt) out_node, const CreateStatsStmt *node); +static void _outStatsElem(OUT_TYPE(StatsElem, StatsElem) out_node, const StatsElem *node); +static void _outAlterStatsStmt(OUT_TYPE(AlterStatsStmt, AlterStatsStmt) out_node, const AlterStatsStmt *node); static void _outCreateFunctionStmt(OUT_TYPE(CreateFunctionStmt, CreateFunctionStmt) out_node, const CreateFunctionStmt *node); +static void _outFunctionParameter(OUT_TYPE(FunctionParameter, FunctionParameter) out_node, const FunctionParameter *node); static void _outAlterFunctionStmt(OUT_TYPE(AlterFunctionStmt, AlterFunctionStmt) out_node, const AlterFunctionStmt *node); static void _outDoStmt(OUT_TYPE(DoStmt, DoStmt) out_node, const DoStmt *node); +static void _outInlineCodeBlock(OUT_TYPE(InlineCodeBlock, InlineCodeBlock) out_node, const InlineCodeBlock *node); +static void _outCallStmt(OUT_TYPE(CallStmt, CallStmt) out_node, const CallStmt *node); +static void _outCallContext(OUT_TYPE(CallContext, CallContext) out_node, const CallContext *node); static void _outRenameStmt(OUT_TYPE(RenameStmt, RenameStmt) out_node, const RenameStmt *node); +static void _outAlterObjectDependsStmt(OUT_TYPE(AlterObjectDependsStmt, AlterObjectDependsStmt) out_node, const AlterObjectDependsStmt *node); +static void _outAlterObjectSchemaStmt(OUT_TYPE(AlterObjectSchemaStmt, AlterObjectSchemaStmt) out_node, const AlterObjectSchemaStmt *node); +static void _outAlterOwnerStmt(OUT_TYPE(AlterOwnerStmt, AlterOwnerStmt) out_node, const AlterOwnerStmt *node); +static void _outAlterOperatorStmt(OUT_TYPE(AlterOperatorStmt, AlterOperatorStmt) out_node, const AlterOperatorStmt *node); +static void _outAlterTypeStmt(OUT_TYPE(AlterTypeStmt, AlterTypeStmt) out_node, const AlterTypeStmt *node); static void _outRuleStmt(OUT_TYPE(RuleStmt, RuleStmt) out_node, const RuleStmt *node); static void _outNotifyStmt(OUT_TYPE(NotifyStmt, NotifyStmt) out_node, const NotifyStmt *node); static void _outListenStmt(OUT_TYPE(ListenStmt, ListenStmt) out_node, const ListenStmt *node); static void _outUnlistenStmt(OUT_TYPE(UnlistenStmt, UnlistenStmt) out_node, const UnlistenStmt *node); static void _outTransactionStmt(OUT_TYPE(TransactionStmt, TransactionStmt) out_node, const TransactionStmt *node); +static void _outCompositeTypeStmt(OUT_TYPE(CompositeTypeStmt, CompositeTypeStmt) out_node, const CompositeTypeStmt *node); +static void _outCreateEnumStmt(OUT_TYPE(CreateEnumStmt, CreateEnumStmt) out_node, const CreateEnumStmt *node); +static void _outCreateRangeStmt(OUT_TYPE(CreateRangeStmt, CreateRangeStmt) out_node, const CreateRangeStmt *node); +static void _outAlterEnumStmt(OUT_TYPE(AlterEnumStmt, AlterEnumStmt) out_node, const AlterEnumStmt *node); static void _outViewStmt(OUT_TYPE(ViewStmt, ViewStmt) out_node, const ViewStmt *node); static void _outLoadStmt(OUT_TYPE(LoadStmt, LoadStmt) out_node, const LoadStmt *node); -static void _outCreateDomainStmt(OUT_TYPE(CreateDomainStmt, CreateDomainStmt) out_node, const CreateDomainStmt *node); static void _outCreatedbStmt(OUT_TYPE(CreatedbStmt, CreatedbStmt) out_node, const CreatedbStmt *node); +static void _outAlterDatabaseStmt(OUT_TYPE(AlterDatabaseStmt, AlterDatabaseStmt) out_node, const AlterDatabaseStmt *node); +static void _outAlterDatabaseRefreshCollStmt(OUT_TYPE(AlterDatabaseRefreshCollStmt, AlterDatabaseRefreshCollStmt) out_node, const AlterDatabaseRefreshCollStmt *node); +static void _outAlterDatabaseSetStmt(OUT_TYPE(AlterDatabaseSetStmt, AlterDatabaseSetStmt) out_node, const AlterDatabaseSetStmt *node); static void _outDropdbStmt(OUT_TYPE(DropdbStmt, DropdbStmt) out_node, const DropdbStmt *node); +static void _outAlterSystemStmt(OUT_TYPE(AlterSystemStmt, AlterSystemStmt) out_node, const AlterSystemStmt *node); +static void _outClusterStmt(OUT_TYPE(ClusterStmt, ClusterStmt) out_node, const ClusterStmt *node); static void _outVacuumStmt(OUT_TYPE(VacuumStmt, VacuumStmt) out_node, const VacuumStmt *node); +static void _outVacuumRelation(OUT_TYPE(VacuumRelation, VacuumRelation) out_node, const VacuumRelation *node); static void _outExplainStmt(OUT_TYPE(ExplainStmt, ExplainStmt) out_node, const ExplainStmt *node); static void _outCreateTableAsStmt(OUT_TYPE(CreateTableAsStmt, CreateTableAsStmt) out_node, const CreateTableAsStmt *node); -static void _outCreateSeqStmt(OUT_TYPE(CreateSeqStmt, CreateSeqStmt) out_node, const CreateSeqStmt *node); -static void _outAlterSeqStmt(OUT_TYPE(AlterSeqStmt, AlterSeqStmt) out_node, const AlterSeqStmt *node); -static void _outVariableSetStmt(OUT_TYPE(VariableSetStmt, VariableSetStmt) out_node, const VariableSetStmt *node); -static void _outVariableShowStmt(OUT_TYPE(VariableShowStmt, VariableShowStmt) out_node, const VariableShowStmt *node); +static void _outRefreshMatViewStmt(OUT_TYPE(RefreshMatViewStmt, RefreshMatViewStmt) out_node, const RefreshMatViewStmt *node); +static void _outCheckPointStmt(OUT_TYPE(CheckPointStmt, CheckPointStmt) out_node, const CheckPointStmt *node); static void _outDiscardStmt(OUT_TYPE(DiscardStmt, DiscardStmt) out_node, const DiscardStmt *node); -static void _outCreateTrigStmt(OUT_TYPE(CreateTrigStmt, CreateTrigStmt) out_node, const CreateTrigStmt *node); -static void _outCreatePLangStmt(OUT_TYPE(CreatePLangStmt, CreatePLangStmt) out_node, const CreatePLangStmt *node); -static void _outCreateRoleStmt(OUT_TYPE(CreateRoleStmt, CreateRoleStmt) out_node, const CreateRoleStmt *node); -static void _outAlterRoleStmt(OUT_TYPE(AlterRoleStmt, AlterRoleStmt) out_node, const AlterRoleStmt *node); -static void _outDropRoleStmt(OUT_TYPE(DropRoleStmt, DropRoleStmt) out_node, const DropRoleStmt *node); static void _outLockStmt(OUT_TYPE(LockStmt, LockStmt) out_node, const LockStmt *node); static void _outConstraintsSetStmt(OUT_TYPE(ConstraintsSetStmt, ConstraintsSetStmt) out_node, const ConstraintsSetStmt *node); static void _outReindexStmt(OUT_TYPE(ReindexStmt, ReindexStmt) out_node, const ReindexStmt *node); -static void _outCheckPointStmt(OUT_TYPE(CheckPointStmt, CheckPointStmt) out_node, const CheckPointStmt *node); -static void _outCreateSchemaStmt(OUT_TYPE(CreateSchemaStmt, CreateSchemaStmt) out_node, const CreateSchemaStmt *node); -static void _outAlterDatabaseStmt(OUT_TYPE(AlterDatabaseStmt, AlterDatabaseStmt) out_node, const AlterDatabaseStmt *node); -static void _outAlterDatabaseRefreshCollStmt(OUT_TYPE(AlterDatabaseRefreshCollStmt, AlterDatabaseRefreshCollStmt) out_node, const AlterDatabaseRefreshCollStmt *node); -static void _outAlterDatabaseSetStmt(OUT_TYPE(AlterDatabaseSetStmt, AlterDatabaseSetStmt) out_node, const AlterDatabaseSetStmt *node); -static void _outAlterRoleSetStmt(OUT_TYPE(AlterRoleSetStmt, AlterRoleSetStmt) out_node, const AlterRoleSetStmt *node); static void _outCreateConversionStmt(OUT_TYPE(CreateConversionStmt, CreateConversionStmt) out_node, const CreateConversionStmt *node); static void _outCreateCastStmt(OUT_TYPE(CreateCastStmt, CreateCastStmt) out_node, const CreateCastStmt *node); -static void _outCreateOpClassStmt(OUT_TYPE(CreateOpClassStmt, CreateOpClassStmt) out_node, const CreateOpClassStmt *node); -static void _outCreateOpFamilyStmt(OUT_TYPE(CreateOpFamilyStmt, CreateOpFamilyStmt) out_node, const CreateOpFamilyStmt *node); -static void _outAlterOpFamilyStmt(OUT_TYPE(AlterOpFamilyStmt, AlterOpFamilyStmt) out_node, const AlterOpFamilyStmt *node); +static void _outCreateTransformStmt(OUT_TYPE(CreateTransformStmt, CreateTransformStmt) out_node, const CreateTransformStmt *node); static void _outPrepareStmt(OUT_TYPE(PrepareStmt, PrepareStmt) out_node, const PrepareStmt *node); static void _outExecuteStmt(OUT_TYPE(ExecuteStmt, ExecuteStmt) out_node, const ExecuteStmt *node); static void _outDeallocateStmt(OUT_TYPE(DeallocateStmt, DeallocateStmt) out_node, const DeallocateStmt *node); -static void _outDeclareCursorStmt(OUT_TYPE(DeclareCursorStmt, DeclareCursorStmt) out_node, const DeclareCursorStmt *node); -static void _outCreateTableSpaceStmt(OUT_TYPE(CreateTableSpaceStmt, CreateTableSpaceStmt) out_node, const CreateTableSpaceStmt *node); -static void _outDropTableSpaceStmt(OUT_TYPE(DropTableSpaceStmt, DropTableSpaceStmt) out_node, const DropTableSpaceStmt *node); -static void _outAlterObjectDependsStmt(OUT_TYPE(AlterObjectDependsStmt, AlterObjectDependsStmt) out_node, const AlterObjectDependsStmt *node); -static void _outAlterObjectSchemaStmt(OUT_TYPE(AlterObjectSchemaStmt, AlterObjectSchemaStmt) out_node, const AlterObjectSchemaStmt *node); -static void _outAlterOwnerStmt(OUT_TYPE(AlterOwnerStmt, AlterOwnerStmt) out_node, const AlterOwnerStmt *node); -static void _outAlterOperatorStmt(OUT_TYPE(AlterOperatorStmt, AlterOperatorStmt) out_node, const AlterOperatorStmt *node); -static void _outAlterTypeStmt(OUT_TYPE(AlterTypeStmt, AlterTypeStmt) out_node, const AlterTypeStmt *node); static void _outDropOwnedStmt(OUT_TYPE(DropOwnedStmt, DropOwnedStmt) out_node, const DropOwnedStmt *node); static void _outReassignOwnedStmt(OUT_TYPE(ReassignOwnedStmt, ReassignOwnedStmt) out_node, const ReassignOwnedStmt *node); -static void _outCompositeTypeStmt(OUT_TYPE(CompositeTypeStmt, CompositeTypeStmt) out_node, const CompositeTypeStmt *node); -static void _outCreateEnumStmt(OUT_TYPE(CreateEnumStmt, CreateEnumStmt) out_node, const CreateEnumStmt *node); -static void _outCreateRangeStmt(OUT_TYPE(CreateRangeStmt, CreateRangeStmt) out_node, const CreateRangeStmt *node); -static void _outAlterEnumStmt(OUT_TYPE(AlterEnumStmt, AlterEnumStmt) out_node, const AlterEnumStmt *node); static void _outAlterTSDictionaryStmt(OUT_TYPE(AlterTSDictionaryStmt, AlterTSDictionaryStmt) out_node, const AlterTSDictionaryStmt *node); static void _outAlterTSConfigurationStmt(OUT_TYPE(AlterTSConfigurationStmt, AlterTSConfigurationStmt) out_node, const AlterTSConfigurationStmt *node); -static void _outCreateFdwStmt(OUT_TYPE(CreateFdwStmt, CreateFdwStmt) out_node, const CreateFdwStmt *node); -static void _outAlterFdwStmt(OUT_TYPE(AlterFdwStmt, AlterFdwStmt) out_node, const AlterFdwStmt *node); -static void _outCreateForeignServerStmt(OUT_TYPE(CreateForeignServerStmt, CreateForeignServerStmt) out_node, const CreateForeignServerStmt *node); -static void _outAlterForeignServerStmt(OUT_TYPE(AlterForeignServerStmt, AlterForeignServerStmt) out_node, const AlterForeignServerStmt *node); -static void _outCreateUserMappingStmt(OUT_TYPE(CreateUserMappingStmt, CreateUserMappingStmt) out_node, const CreateUserMappingStmt *node); -static void _outAlterUserMappingStmt(OUT_TYPE(AlterUserMappingStmt, AlterUserMappingStmt) out_node, const AlterUserMappingStmt *node); -static void _outDropUserMappingStmt(OUT_TYPE(DropUserMappingStmt, DropUserMappingStmt) out_node, const DropUserMappingStmt *node); -static void _outAlterTableSpaceOptionsStmt(OUT_TYPE(AlterTableSpaceOptionsStmt, AlterTableSpaceOptionsStmt) out_node, const AlterTableSpaceOptionsStmt *node); -static void _outAlterTableMoveAllStmt(OUT_TYPE(AlterTableMoveAllStmt, AlterTableMoveAllStmt) out_node, const AlterTableMoveAllStmt *node); -static void _outSecLabelStmt(OUT_TYPE(SecLabelStmt, SecLabelStmt) out_node, const SecLabelStmt *node); -static void _outCreateForeignTableStmt(OUT_TYPE(CreateForeignTableStmt, CreateForeignTableStmt) out_node, const CreateForeignTableStmt *node); -static void _outImportForeignSchemaStmt(OUT_TYPE(ImportForeignSchemaStmt, ImportForeignSchemaStmt) out_node, const ImportForeignSchemaStmt *node); -static void _outCreateExtensionStmt(OUT_TYPE(CreateExtensionStmt, CreateExtensionStmt) out_node, const CreateExtensionStmt *node); -static void _outAlterExtensionStmt(OUT_TYPE(AlterExtensionStmt, AlterExtensionStmt) out_node, const AlterExtensionStmt *node); -static void _outAlterExtensionContentsStmt(OUT_TYPE(AlterExtensionContentsStmt, AlterExtensionContentsStmt) out_node, const AlterExtensionContentsStmt *node); -static void _outCreateEventTrigStmt(OUT_TYPE(CreateEventTrigStmt, CreateEventTrigStmt) out_node, const CreateEventTrigStmt *node); -static void _outAlterEventTrigStmt(OUT_TYPE(AlterEventTrigStmt, AlterEventTrigStmt) out_node, const AlterEventTrigStmt *node); -static void _outRefreshMatViewStmt(OUT_TYPE(RefreshMatViewStmt, RefreshMatViewStmt) out_node, const RefreshMatViewStmt *node); -static void _outReplicaIdentityStmt(OUT_TYPE(ReplicaIdentityStmt, ReplicaIdentityStmt) out_node, const ReplicaIdentityStmt *node); -static void _outAlterSystemStmt(OUT_TYPE(AlterSystemStmt, AlterSystemStmt) out_node, const AlterSystemStmt *node); -static void _outCreatePolicyStmt(OUT_TYPE(CreatePolicyStmt, CreatePolicyStmt) out_node, const CreatePolicyStmt *node); -static void _outAlterPolicyStmt(OUT_TYPE(AlterPolicyStmt, AlterPolicyStmt) out_node, const AlterPolicyStmt *node); -static void _outCreateTransformStmt(OUT_TYPE(CreateTransformStmt, CreateTransformStmt) out_node, const CreateTransformStmt *node); -static void _outCreateAmStmt(OUT_TYPE(CreateAmStmt, CreateAmStmt) out_node, const CreateAmStmt *node); +static void _outPublicationTable(OUT_TYPE(PublicationTable, PublicationTable) out_node, const PublicationTable *node); +static void _outPublicationObjSpec(OUT_TYPE(PublicationObjSpec, PublicationObjSpec) out_node, const PublicationObjSpec *node); static void _outCreatePublicationStmt(OUT_TYPE(CreatePublicationStmt, CreatePublicationStmt) out_node, const CreatePublicationStmt *node); static void _outAlterPublicationStmt(OUT_TYPE(AlterPublicationStmt, AlterPublicationStmt) out_node, const AlterPublicationStmt *node); static void _outCreateSubscriptionStmt(OUT_TYPE(CreateSubscriptionStmt, CreateSubscriptionStmt) out_node, const CreateSubscriptionStmt *node); static void _outAlterSubscriptionStmt(OUT_TYPE(AlterSubscriptionStmt, AlterSubscriptionStmt) out_node, const AlterSubscriptionStmt *node); static void _outDropSubscriptionStmt(OUT_TYPE(DropSubscriptionStmt, DropSubscriptionStmt) out_node, const DropSubscriptionStmt *node); -static void _outCreateStatsStmt(OUT_TYPE(CreateStatsStmt, CreateStatsStmt) out_node, const CreateStatsStmt *node); -static void _outAlterCollationStmt(OUT_TYPE(AlterCollationStmt, AlterCollationStmt) out_node, const AlterCollationStmt *node); -static void _outCallStmt(OUT_TYPE(CallStmt, CallStmt) out_node, const CallStmt *node); -static void _outAlterStatsStmt(OUT_TYPE(AlterStatsStmt, AlterStatsStmt) out_node, const AlterStatsStmt *node); -static void _outAExpr(OUT_TYPE(A_Expr, AExpr) out_node, const A_Expr *node); -static void _outColumnRef(OUT_TYPE(ColumnRef, ColumnRef) out_node, const ColumnRef *node); -static void _outParamRef(OUT_TYPE(ParamRef, ParamRef) out_node, const ParamRef *node); -static void _outFuncCall(OUT_TYPE(FuncCall, FuncCall) out_node, const FuncCall *node); -static void _outAStar(OUT_TYPE(A_Star, AStar) out_node, const A_Star *node); -static void _outAIndices(OUT_TYPE(A_Indices, AIndices) out_node, const A_Indices *node); -static void _outAIndirection(OUT_TYPE(A_Indirection, AIndirection) out_node, const A_Indirection *node); -static void _outAArrayExpr(OUT_TYPE(A_ArrayExpr, AArrayExpr) out_node, const A_ArrayExpr *node); -static void _outResTarget(OUT_TYPE(ResTarget, ResTarget) out_node, const ResTarget *node); -static void _outMultiAssignRef(OUT_TYPE(MultiAssignRef, MultiAssignRef) out_node, const MultiAssignRef *node); -static void _outTypeCast(OUT_TYPE(TypeCast, TypeCast) out_node, const TypeCast *node); -static void _outCollateClause(OUT_TYPE(CollateClause, CollateClause) out_node, const CollateClause *node); -static void _outSortBy(OUT_TYPE(SortBy, SortBy) out_node, const SortBy *node); -static void _outWindowDef(OUT_TYPE(WindowDef, WindowDef) out_node, const WindowDef *node); -static void _outRangeSubselect(OUT_TYPE(RangeSubselect, RangeSubselect) out_node, const RangeSubselect *node); -static void _outRangeFunction(OUT_TYPE(RangeFunction, RangeFunction) out_node, const RangeFunction *node); -static void _outRangeTableSample(OUT_TYPE(RangeTableSample, RangeTableSample) out_node, const RangeTableSample *node); -static void _outRangeTableFunc(OUT_TYPE(RangeTableFunc, RangeTableFunc) out_node, const RangeTableFunc *node); -static void _outRangeTableFuncCol(OUT_TYPE(RangeTableFuncCol, RangeTableFuncCol) out_node, const RangeTableFuncCol *node); -static void _outTypeName(OUT_TYPE(TypeName, TypeName) out_node, const TypeName *node); -static void _outColumnDef(OUT_TYPE(ColumnDef, ColumnDef) out_node, const ColumnDef *node); -static void _outIndexElem(OUT_TYPE(IndexElem, IndexElem) out_node, const IndexElem *node); -static void _outStatsElem(OUT_TYPE(StatsElem, StatsElem) out_node, const StatsElem *node); -static void _outConstraint(OUT_TYPE(Constraint, Constraint) out_node, const Constraint *node); -static void _outDefElem(OUT_TYPE(DefElem, DefElem) out_node, const DefElem *node); -static void _outRangeTblEntry(OUT_TYPE(RangeTblEntry, RangeTblEntry) out_node, const RangeTblEntry *node); -static void _outRangeTblFunction(OUT_TYPE(RangeTblFunction, RangeTblFunction) out_node, const RangeTblFunction *node); -static void _outTableSampleClause(OUT_TYPE(TableSampleClause, TableSampleClause) out_node, const TableSampleClause *node); -static void _outWithCheckOption(OUT_TYPE(WithCheckOption, WithCheckOption) out_node, const WithCheckOption *node); -static void _outSortGroupClause(OUT_TYPE(SortGroupClause, SortGroupClause) out_node, const SortGroupClause *node); -static void _outGroupingSet(OUT_TYPE(GroupingSet, GroupingSet) out_node, const GroupingSet *node); -static void _outWindowClause(OUT_TYPE(WindowClause, WindowClause) out_node, const WindowClause *node); -static void _outObjectWithArgs(OUT_TYPE(ObjectWithArgs, ObjectWithArgs) out_node, const ObjectWithArgs *node); -static void _outAccessPriv(OUT_TYPE(AccessPriv, AccessPriv) out_node, const AccessPriv *node); -static void _outCreateOpClassItem(OUT_TYPE(CreateOpClassItem, CreateOpClassItem) out_node, const CreateOpClassItem *node); -static void _outTableLikeClause(OUT_TYPE(TableLikeClause, TableLikeClause) out_node, const TableLikeClause *node); -static void _outFunctionParameter(OUT_TYPE(FunctionParameter, FunctionParameter) out_node, const FunctionParameter *node); -static void _outLockingClause(OUT_TYPE(LockingClause, LockingClause) out_node, const LockingClause *node); -static void _outRowMarkClause(OUT_TYPE(RowMarkClause, RowMarkClause) out_node, const RowMarkClause *node); -static void _outXmlSerialize(OUT_TYPE(XmlSerialize, XmlSerialize) out_node, const XmlSerialize *node); -static void _outWithClause(OUT_TYPE(WithClause, WithClause) out_node, const WithClause *node); -static void _outInferClause(OUT_TYPE(InferClause, InferClause) out_node, const InferClause *node); -static void _outOnConflictClause(OUT_TYPE(OnConflictClause, OnConflictClause) out_node, const OnConflictClause *node); -static void _outCTESearchClause(OUT_TYPE(CTESearchClause, CTESearchClause) out_node, const CTESearchClause *node); -static void _outCTECycleClause(OUT_TYPE(CTECycleClause, CTECycleClause) out_node, const CTECycleClause *node); -static void _outCommonTableExpr(OUT_TYPE(CommonTableExpr, CommonTableExpr) out_node, const CommonTableExpr *node); -static void _outMergeWhenClause(OUT_TYPE(MergeWhenClause, MergeWhenClause) out_node, const MergeWhenClause *node); -static void _outRoleSpec(OUT_TYPE(RoleSpec, RoleSpec) out_node, const RoleSpec *node); -static void _outTriggerTransition(OUT_TYPE(TriggerTransition, TriggerTransition) out_node, const TriggerTransition *node); -static void _outPartitionElem(OUT_TYPE(PartitionElem, PartitionElem) out_node, const PartitionElem *node); -static void _outPartitionSpec(OUT_TYPE(PartitionSpec, PartitionSpec) out_node, const PartitionSpec *node); -static void _outPartitionBoundSpec(OUT_TYPE(PartitionBoundSpec, PartitionBoundSpec) out_node, const PartitionBoundSpec *node); -static void _outPartitionRangeDatum(OUT_TYPE(PartitionRangeDatum, PartitionRangeDatum) out_node, const PartitionRangeDatum *node); -static void _outPartitionCmd(OUT_TYPE(PartitionCmd, PartitionCmd) out_node, const PartitionCmd *node); -static void _outVacuumRelation(OUT_TYPE(VacuumRelation, VacuumRelation) out_node, const VacuumRelation *node); -static void _outPublicationObjSpec(OUT_TYPE(PublicationObjSpec, PublicationObjSpec) out_node, const PublicationObjSpec *node); -static void _outPublicationTable(OUT_TYPE(PublicationTable, PublicationTable) out_node, const PublicationTable *node); -static void _outInlineCodeBlock(OUT_TYPE(InlineCodeBlock, InlineCodeBlock) out_node, const InlineCodeBlock *node); -static void _outCallContext(OUT_TYPE(CallContext, CallContext) out_node, const CallContext *node); static void @@ -269,18 +283,30 @@ _outTableFunc(OUT_TYPE(TableFunc, TableFunc) out, const TableFunc *node) } static void -_outVar(OUT_TYPE(Var, Var) out, const Var *node) +_outIntoClause(OUT_TYPE(IntoClause, IntoClause) out, const IntoClause *node) { - WRITE_INT_FIELD(varno, varno, varno); - WRITE_INT_FIELD(varattno, varattno, varattno); - WRITE_UINT_FIELD(vartype, vartype, vartype); - WRITE_INT_FIELD(vartypmod, vartypmod, vartypmod); - WRITE_UINT_FIELD(varcollid, varcollid, varcollid); - WRITE_UINT_FIELD(varlevelsup, varlevelsup, varlevelsup); - WRITE_UINT_FIELD(varnosyn, varnosyn, varnosyn); - WRITE_INT_FIELD(varattnosyn, varattnosyn, varattnosyn); - WRITE_INT_FIELD(location, location, location); -} + WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, rel, rel, rel); + WRITE_LIST_FIELD(col_names, colNames, colNames); + WRITE_STRING_FIELD(access_method, accessMethod, accessMethod); + WRITE_LIST_FIELD(options, options, options); + WRITE_ENUM_FIELD(OnCommitAction, on_commit, onCommit, onCommit); + WRITE_STRING_FIELD(table_space_name, tableSpaceName, tableSpaceName); + WRITE_NODE_PTR_FIELD(view_query, viewQuery, viewQuery); + WRITE_BOOL_FIELD(skip_data, skipData, skipData); +} + +static void +_outVar(OUT_TYPE(Var, Var) out, const Var *node) +{ + WRITE_INT_FIELD(varno, varno, varno); + WRITE_INT_FIELD(varattno, varattno, varattno); + WRITE_UINT_FIELD(vartype, vartype, vartype); + WRITE_INT_FIELD(vartypmod, vartypmod, vartypmod); + WRITE_UINT_FIELD(varcollid, varcollid, varcollid); + WRITE_BITMAPSET_FIELD(varnullingrels, varnullingrels, varnullingrels); + WRITE_UINT_FIELD(varlevelsup, varlevelsup, varlevelsup); + WRITE_INT_FIELD(location, location, location); +} static void _outParam(OUT_TYPE(Param, Param) out, const Param *node) @@ -300,7 +326,6 @@ _outAggref(OUT_TYPE(Aggref, Aggref) out, const Aggref *node) WRITE_UINT_FIELD(aggtype, aggtype, aggtype); WRITE_UINT_FIELD(aggcollid, aggcollid, aggcollid); WRITE_UINT_FIELD(inputcollid, inputcollid, inputcollid); - WRITE_UINT_FIELD(aggtranstype, aggtranstype, aggtranstype); WRITE_LIST_FIELD(aggargtypes, aggargtypes, aggargtypes); WRITE_LIST_FIELD(aggdirectargs, aggdirectargs, aggdirectargs); WRITE_LIST_FIELD(args, args, args); @@ -322,7 +347,6 @@ _outGroupingFunc(OUT_TYPE(GroupingFunc, GroupingFunc) out, const GroupingFunc *n { WRITE_LIST_FIELD(args, args, args); WRITE_LIST_FIELD(refs, refs, refs); - WRITE_LIST_FIELD(cols, cols, cols); WRITE_UINT_FIELD(agglevelsup, agglevelsup, agglevelsup); WRITE_INT_FIELD(location, location, location); } @@ -383,7 +407,6 @@ static void _outOpExpr(OUT_TYPE(OpExpr, OpExpr) out, const OpExpr *node) { WRITE_UINT_FIELD(opno, opno, opno); - WRITE_UINT_FIELD(opfuncid, opfuncid, opfuncid); WRITE_UINT_FIELD(opresulttype, opresulttype, opresulttype); WRITE_BOOL_FIELD(opretset, opretset, opretset); WRITE_UINT_FIELD(opcollid, opcollid, opcollid); @@ -396,7 +419,6 @@ static void _outDistinctExpr(OUT_TYPE(DistinctExpr, DistinctExpr) out, const DistinctExpr *node) { WRITE_UINT_FIELD(opno, opno, opno); - WRITE_UINT_FIELD(opfuncid, opfuncid, opfuncid); WRITE_UINT_FIELD(opresulttype, opresulttype, opresulttype); WRITE_BOOL_FIELD(opretset, opretset, opretset); WRITE_UINT_FIELD(opcollid, opcollid, opcollid); @@ -409,7 +431,6 @@ static void _outNullIfExpr(OUT_TYPE(NullIfExpr, NullIfExpr) out, const NullIfExpr *node) { WRITE_UINT_FIELD(opno, opno, opno); - WRITE_UINT_FIELD(opfuncid, opfuncid, opfuncid); WRITE_UINT_FIELD(opresulttype, opresulttype, opresulttype); WRITE_BOOL_FIELD(opretset, opretset, opretset); WRITE_UINT_FIELD(opcollid, opcollid, opcollid); @@ -422,9 +443,6 @@ static void _outScalarArrayOpExpr(OUT_TYPE(ScalarArrayOpExpr, ScalarArrayOpExpr) out, const ScalarArrayOpExpr *node) { WRITE_UINT_FIELD(opno, opno, opno); - WRITE_UINT_FIELD(opfuncid, opfuncid, opfuncid); - WRITE_UINT_FIELD(hashfuncid, hashfuncid, hashfuncid); - WRITE_UINT_FIELD(negfuncid, negfuncid, negfuncid); WRITE_BOOL_FIELD(use_or, useOr, useOr); WRITE_UINT_FIELD(inputcollid, inputcollid, inputcollid); WRITE_LIST_FIELD(args, args, args); @@ -643,11 +661,59 @@ _outXmlExpr(OUT_TYPE(XmlExpr, XmlExpr) out, const XmlExpr *node) WRITE_LIST_FIELD(arg_names, arg_names, arg_names); WRITE_LIST_FIELD(args, args, args); WRITE_ENUM_FIELD(XmlOptionType, xmloption, xmloption, xmloption); + WRITE_BOOL_FIELD(indent, indent, indent); WRITE_UINT_FIELD(type, type, type); WRITE_INT_FIELD(typmod, typmod, typmod); WRITE_INT_FIELD(location, location, location); } +static void +_outJsonFormat(OUT_TYPE(JsonFormat, JsonFormat) out, const JsonFormat *node) +{ + WRITE_ENUM_FIELD(JsonFormatType, format_type, format_type, format_type); + WRITE_ENUM_FIELD(JsonEncoding, encoding, encoding, encoding); + WRITE_INT_FIELD(location, location, location); +} + +static void +_outJsonReturning(OUT_TYPE(JsonReturning, JsonReturning) out, const JsonReturning *node) +{ + WRITE_SPECIFIC_NODE_PTR_FIELD(JsonFormat, json_format, format, format, format); + WRITE_UINT_FIELD(typid, typid, typid); + WRITE_INT_FIELD(typmod, typmod, typmod); +} + +static void +_outJsonValueExpr(OUT_TYPE(JsonValueExpr, JsonValueExpr) out, const JsonValueExpr *node) +{ + WRITE_NODE_PTR_FIELD(raw_expr, raw_expr, raw_expr); + WRITE_NODE_PTR_FIELD(formatted_expr, formatted_expr, formatted_expr); + WRITE_SPECIFIC_NODE_PTR_FIELD(JsonFormat, json_format, format, format, format); +} + +static void +_outJsonConstructorExpr(OUT_TYPE(JsonConstructorExpr, JsonConstructorExpr) out, const JsonConstructorExpr *node) +{ + WRITE_ENUM_FIELD(JsonConstructorType, type, type, type); + WRITE_LIST_FIELD(args, args, args); + WRITE_NODE_PTR_FIELD(func, func, func); + WRITE_NODE_PTR_FIELD(coercion, coercion, coercion); + WRITE_SPECIFIC_NODE_PTR_FIELD(JsonReturning, json_returning, returning, returning, returning); + WRITE_BOOL_FIELD(absent_on_null, absent_on_null, absent_on_null); + WRITE_BOOL_FIELD(unique, unique, unique); + WRITE_INT_FIELD(location, location, location); +} + +static void +_outJsonIsPredicate(OUT_TYPE(JsonIsPredicate, JsonIsPredicate) out, const JsonIsPredicate *node) +{ + WRITE_NODE_PTR_FIELD(expr, expr, expr); + WRITE_SPECIFIC_NODE_PTR_FIELD(JsonFormat, json_format, format, format, format); + WRITE_ENUM_FIELD(JsonValueType, item_type, item_type, item_type); + WRITE_BOOL_FIELD(unique_keys, unique_keys, unique_keys); + WRITE_INT_FIELD(location, location, location); +} + static void _outNullTest(OUT_TYPE(NullTest, NullTest) out, const NullTest *node) { @@ -769,38 +835,6 @@ _outOnConflictExpr(OUT_TYPE(OnConflictExpr, OnConflictExpr) out, const OnConflic WRITE_LIST_FIELD(excl_rel_tlist, exclRelTlist, exclRelTlist); } -static void -_outIntoClause(OUT_TYPE(IntoClause, IntoClause) out, const IntoClause *node) -{ - WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, rel, rel, rel); - WRITE_LIST_FIELD(col_names, colNames, colNames); - WRITE_STRING_FIELD(access_method, accessMethod, accessMethod); - WRITE_LIST_FIELD(options, options, options); - WRITE_ENUM_FIELD(OnCommitAction, on_commit, onCommit, onCommit); - WRITE_STRING_FIELD(table_space_name, tableSpaceName, tableSpaceName); - WRITE_NODE_PTR_FIELD(view_query, viewQuery, viewQuery); - WRITE_BOOL_FIELD(skip_data, skipData, skipData); -} - -static void -_outMergeAction(OUT_TYPE(MergeAction, MergeAction) out, const MergeAction *node) -{ - WRITE_BOOL_FIELD(matched, matched, matched); - WRITE_ENUM_FIELD(CmdType, command_type, commandType, commandType); - WRITE_ENUM_FIELD(OverridingKind, override, override, override); - WRITE_NODE_PTR_FIELD(qual, qual, qual); - WRITE_LIST_FIELD(target_list, targetList, targetList); - WRITE_LIST_FIELD(update_colnos, updateColnos, updateColnos); -} - -static void -_outRawStmt(OUT_TYPE(RawStmt, RawStmt) out, const RawStmt *node) -{ - WRITE_NODE_PTR_FIELD(stmt, stmt, stmt); - WRITE_INT_FIELD(stmt_location, stmt_location, stmt_location); - WRITE_INT_FIELD(stmt_len, stmt_len, stmt_len); -} - static void _outQuery(OUT_TYPE(Query, Query) out, const Query *node) { @@ -821,6 +855,7 @@ _outQuery(OUT_TYPE(Query, Query) out, const Query *node) WRITE_BOOL_FIELD(is_return, isReturn, isReturn); WRITE_LIST_FIELD(cte_list, cteList, cteList); WRITE_LIST_FIELD(rtable, rtable, rtable); + WRITE_LIST_FIELD(rteperminfos, rteperminfos, rteperminfos); WRITE_SPECIFIC_NODE_PTR_FIELD(FromExpr, from_expr, jointree, jointree, jointree); WRITE_LIST_FIELD(merge_action_list, mergeActionList, mergeActionList); WRITE_BOOL_FIELD(merge_use_outer_join, mergeUseOuterJoin, mergeUseOuterJoin); @@ -847,851 +882,918 @@ _outQuery(OUT_TYPE(Query, Query) out, const Query *node) } static void -_outInsertStmt(OUT_TYPE(InsertStmt, InsertStmt) out, const InsertStmt *node) +_outTypeName(OUT_TYPE(TypeName, TypeName) out, const TypeName *node) { - WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); - WRITE_LIST_FIELD(cols, cols, cols); - WRITE_NODE_PTR_FIELD(select_stmt, selectStmt, selectStmt); - WRITE_SPECIFIC_NODE_PTR_FIELD(OnConflictClause, on_conflict_clause, on_conflict_clause, onConflictClause, onConflictClause); - WRITE_LIST_FIELD(returning_list, returningList, returningList); - WRITE_SPECIFIC_NODE_PTR_FIELD(WithClause, with_clause, with_clause, withClause, withClause); - WRITE_ENUM_FIELD(OverridingKind, override, override, override); + WRITE_LIST_FIELD(names, names, names); + WRITE_UINT_FIELD(type_oid, typeOid, typeOid); + WRITE_BOOL_FIELD(setof, setof, setof); + WRITE_BOOL_FIELD(pct_type, pct_type, pct_type); + WRITE_LIST_FIELD(typmods, typmods, typmods); + WRITE_INT_FIELD(typemod, typemod, typemod); + WRITE_LIST_FIELD(array_bounds, arrayBounds, arrayBounds); + WRITE_INT_FIELD(location, location, location); } static void -_outDeleteStmt(OUT_TYPE(DeleteStmt, DeleteStmt) out, const DeleteStmt *node) +_outColumnRef(OUT_TYPE(ColumnRef, ColumnRef) out, const ColumnRef *node) { - WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); - WRITE_LIST_FIELD(using_clause, usingClause, usingClause); - WRITE_NODE_PTR_FIELD(where_clause, whereClause, whereClause); - WRITE_LIST_FIELD(returning_list, returningList, returningList); - WRITE_SPECIFIC_NODE_PTR_FIELD(WithClause, with_clause, with_clause, withClause, withClause); + WRITE_LIST_FIELD(fields, fields, fields); + WRITE_INT_FIELD(location, location, location); } static void -_outUpdateStmt(OUT_TYPE(UpdateStmt, UpdateStmt) out, const UpdateStmt *node) +_outParamRef(OUT_TYPE(ParamRef, ParamRef) out, const ParamRef *node) { - WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); - WRITE_LIST_FIELD(target_list, targetList, targetList); - WRITE_NODE_PTR_FIELD(where_clause, whereClause, whereClause); - WRITE_LIST_FIELD(from_clause, fromClause, fromClause); - WRITE_LIST_FIELD(returning_list, returningList, returningList); - WRITE_SPECIFIC_NODE_PTR_FIELD(WithClause, with_clause, with_clause, withClause, withClause); + WRITE_INT_FIELD(number, number, number); + WRITE_INT_FIELD(location, location, location); } static void -_outMergeStmt(OUT_TYPE(MergeStmt, MergeStmt) out, const MergeStmt *node) +_outAExpr(OUT_TYPE(A_Expr, AExpr) out, const A_Expr *node) { - WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); - WRITE_NODE_PTR_FIELD(source_relation, sourceRelation, sourceRelation); - WRITE_NODE_PTR_FIELD(join_condition, joinCondition, joinCondition); - WRITE_LIST_FIELD(merge_when_clauses, mergeWhenClauses, mergeWhenClauses); - WRITE_SPECIFIC_NODE_PTR_FIELD(WithClause, with_clause, with_clause, withClause, withClause); + WRITE_ENUM_FIELD(A_Expr_Kind, kind, kind, kind); + WRITE_LIST_FIELD(name, name, name); + WRITE_NODE_PTR_FIELD(lexpr, lexpr, lexpr); + WRITE_NODE_PTR_FIELD(rexpr, rexpr, rexpr); + WRITE_INT_FIELD(location, location, location); } static void -_outSelectStmt(OUT_TYPE(SelectStmt, SelectStmt) out, const SelectStmt *node) +_outTypeCast(OUT_TYPE(TypeCast, TypeCast) out, const TypeCast *node) { - WRITE_LIST_FIELD(distinct_clause, distinctClause, distinctClause); - WRITE_SPECIFIC_NODE_PTR_FIELD(IntoClause, into_clause, into_clause, intoClause, intoClause); - WRITE_LIST_FIELD(target_list, targetList, targetList); - WRITE_LIST_FIELD(from_clause, fromClause, fromClause); - WRITE_NODE_PTR_FIELD(where_clause, whereClause, whereClause); - WRITE_LIST_FIELD(group_clause, groupClause, groupClause); - WRITE_BOOL_FIELD(group_distinct, groupDistinct, groupDistinct); - WRITE_NODE_PTR_FIELD(having_clause, havingClause, havingClause); - WRITE_LIST_FIELD(window_clause, windowClause, windowClause); - WRITE_LIST_FIELD(values_lists, valuesLists, valuesLists); - WRITE_LIST_FIELD(sort_clause, sortClause, sortClause); - WRITE_NODE_PTR_FIELD(limit_offset, limitOffset, limitOffset); - WRITE_NODE_PTR_FIELD(limit_count, limitCount, limitCount); - WRITE_ENUM_FIELD(LimitOption, limit_option, limitOption, limitOption); - WRITE_LIST_FIELD(locking_clause, lockingClause, lockingClause); - WRITE_SPECIFIC_NODE_PTR_FIELD(WithClause, with_clause, with_clause, withClause, withClause); - WRITE_ENUM_FIELD(SetOperation, op, op, op); - WRITE_BOOL_FIELD(all, all, all); - WRITE_SPECIFIC_NODE_PTR_FIELD(SelectStmt, select_stmt, larg, larg, larg); - WRITE_SPECIFIC_NODE_PTR_FIELD(SelectStmt, select_stmt, rarg, rarg, rarg); + WRITE_NODE_PTR_FIELD(arg, arg, arg); + WRITE_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, type_name, typeName, typeName); + WRITE_INT_FIELD(location, location, location); } static void -_outReturnStmt(OUT_TYPE(ReturnStmt, ReturnStmt) out, const ReturnStmt *node) +_outCollateClause(OUT_TYPE(CollateClause, CollateClause) out, const CollateClause *node) { - WRITE_NODE_PTR_FIELD(returnval, returnval, returnval); + WRITE_NODE_PTR_FIELD(arg, arg, arg); + WRITE_LIST_FIELD(collname, collname, collname); + WRITE_INT_FIELD(location, location, location); } static void -_outPLAssignStmt(OUT_TYPE(PLAssignStmt, PLAssignStmt) out, const PLAssignStmt *node) +_outRoleSpec(OUT_TYPE(RoleSpec, RoleSpec) out, const RoleSpec *node) { - WRITE_STRING_FIELD(name, name, name); - WRITE_LIST_FIELD(indirection, indirection, indirection); - WRITE_INT_FIELD(nnames, nnames, nnames); - WRITE_SPECIFIC_NODE_PTR_FIELD(SelectStmt, select_stmt, val, val, val); + WRITE_ENUM_FIELD(RoleSpecType, roletype, roletype, roletype); + WRITE_STRING_FIELD(rolename, rolename, rolename); WRITE_INT_FIELD(location, location, location); } static void -_outAlterTableStmt(OUT_TYPE(AlterTableStmt, AlterTableStmt) out, const AlterTableStmt *node) +_outFuncCall(OUT_TYPE(FuncCall, FuncCall) out, const FuncCall *node) { - WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); - WRITE_LIST_FIELD(cmds, cmds, cmds); - WRITE_ENUM_FIELD(ObjectType, objtype, objtype, objtype); - WRITE_BOOL_FIELD(missing_ok, missing_ok, missing_ok); + WRITE_LIST_FIELD(funcname, funcname, funcname); + WRITE_LIST_FIELD(args, args, args); + WRITE_LIST_FIELD(agg_order, agg_order, agg_order); + WRITE_NODE_PTR_FIELD(agg_filter, agg_filter, agg_filter); + WRITE_SPECIFIC_NODE_PTR_FIELD(WindowDef, window_def, over, over, over); + WRITE_BOOL_FIELD(agg_within_group, agg_within_group, agg_within_group); + WRITE_BOOL_FIELD(agg_star, agg_star, agg_star); + WRITE_BOOL_FIELD(agg_distinct, agg_distinct, agg_distinct); + WRITE_BOOL_FIELD(func_variadic, func_variadic, func_variadic); + WRITE_ENUM_FIELD(CoercionForm, funcformat, funcformat, funcformat); + WRITE_INT_FIELD(location, location, location); } static void -_outAlterTableCmd(OUT_TYPE(AlterTableCmd, AlterTableCmd) out, const AlterTableCmd *node) +_outAStar(OUT_TYPE(A_Star, AStar) out, const A_Star *node) { - WRITE_ENUM_FIELD(AlterTableType, subtype, subtype, subtype); - WRITE_STRING_FIELD(name, name, name); - WRITE_INT_FIELD(num, num, num); - WRITE_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, newowner, newowner, newowner); - WRITE_NODE_PTR_FIELD(def, def, def); - WRITE_ENUM_FIELD(DropBehavior, behavior, behavior, behavior); - WRITE_BOOL_FIELD(missing_ok, missing_ok, missing_ok); - WRITE_BOOL_FIELD(recurse, recurse, recurse); } static void -_outAlterDomainStmt(OUT_TYPE(AlterDomainStmt, AlterDomainStmt) out, const AlterDomainStmt *node) +_outAIndices(OUT_TYPE(A_Indices, AIndices) out, const A_Indices *node) { - WRITE_CHAR_FIELD(subtype, subtype, subtype); - WRITE_LIST_FIELD(type_name, typeName, typeName); - WRITE_STRING_FIELD(name, name, name); - WRITE_NODE_PTR_FIELD(def, def, def); - WRITE_ENUM_FIELD(DropBehavior, behavior, behavior, behavior); - WRITE_BOOL_FIELD(missing_ok, missing_ok, missing_ok); + WRITE_BOOL_FIELD(is_slice, is_slice, is_slice); + WRITE_NODE_PTR_FIELD(lidx, lidx, lidx); + WRITE_NODE_PTR_FIELD(uidx, uidx, uidx); } static void -_outSetOperationStmt(OUT_TYPE(SetOperationStmt, SetOperationStmt) out, const SetOperationStmt *node) +_outAIndirection(OUT_TYPE(A_Indirection, AIndirection) out, const A_Indirection *node) { - WRITE_ENUM_FIELD(SetOperation, op, op, op); - WRITE_BOOL_FIELD(all, all, all); - WRITE_NODE_PTR_FIELD(larg, larg, larg); - WRITE_NODE_PTR_FIELD(rarg, rarg, rarg); - WRITE_LIST_FIELD(col_types, colTypes, colTypes); - WRITE_LIST_FIELD(col_typmods, colTypmods, colTypmods); - WRITE_LIST_FIELD(col_collations, colCollations, colCollations); - WRITE_LIST_FIELD(group_clauses, groupClauses, groupClauses); + WRITE_NODE_PTR_FIELD(arg, arg, arg); + WRITE_LIST_FIELD(indirection, indirection, indirection); } static void -_outGrantStmt(OUT_TYPE(GrantStmt, GrantStmt) out, const GrantStmt *node) +_outAArrayExpr(OUT_TYPE(A_ArrayExpr, AArrayExpr) out, const A_ArrayExpr *node) { - WRITE_BOOL_FIELD(is_grant, is_grant, is_grant); - WRITE_ENUM_FIELD(GrantTargetType, targtype, targtype, targtype); - WRITE_ENUM_FIELD(ObjectType, objtype, objtype, objtype); - WRITE_LIST_FIELD(objects, objects, objects); - WRITE_LIST_FIELD(privileges, privileges, privileges); - WRITE_LIST_FIELD(grantees, grantees, grantees); - WRITE_BOOL_FIELD(grant_option, grant_option, grant_option); - WRITE_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, grantor, grantor, grantor); - WRITE_ENUM_FIELD(DropBehavior, behavior, behavior, behavior); + WRITE_LIST_FIELD(elements, elements, elements); + WRITE_INT_FIELD(location, location, location); } static void -_outGrantRoleStmt(OUT_TYPE(GrantRoleStmt, GrantRoleStmt) out, const GrantRoleStmt *node) +_outResTarget(OUT_TYPE(ResTarget, ResTarget) out, const ResTarget *node) { - WRITE_LIST_FIELD(granted_roles, granted_roles, granted_roles); - WRITE_LIST_FIELD(grantee_roles, grantee_roles, grantee_roles); - WRITE_BOOL_FIELD(is_grant, is_grant, is_grant); - WRITE_BOOL_FIELD(admin_opt, admin_opt, admin_opt); - WRITE_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, grantor, grantor, grantor); - WRITE_ENUM_FIELD(DropBehavior, behavior, behavior, behavior); + WRITE_STRING_FIELD(name, name, name); + WRITE_LIST_FIELD(indirection, indirection, indirection); + WRITE_NODE_PTR_FIELD(val, val, val); + WRITE_INT_FIELD(location, location, location); } static void -_outAlterDefaultPrivilegesStmt(OUT_TYPE(AlterDefaultPrivilegesStmt, AlterDefaultPrivilegesStmt) out, const AlterDefaultPrivilegesStmt *node) +_outMultiAssignRef(OUT_TYPE(MultiAssignRef, MultiAssignRef) out, const MultiAssignRef *node) { - WRITE_LIST_FIELD(options, options, options); - WRITE_SPECIFIC_NODE_PTR_FIELD(GrantStmt, grant_stmt, action, action, action); + WRITE_NODE_PTR_FIELD(source, source, source); + WRITE_INT_FIELD(colno, colno, colno); + WRITE_INT_FIELD(ncolumns, ncolumns, ncolumns); } static void -_outClosePortalStmt(OUT_TYPE(ClosePortalStmt, ClosePortalStmt) out, const ClosePortalStmt *node) +_outSortBy(OUT_TYPE(SortBy, SortBy) out, const SortBy *node) { - WRITE_STRING_FIELD(portalname, portalname, portalname); -} - -static void -_outClusterStmt(OUT_TYPE(ClusterStmt, ClusterStmt) out, const ClusterStmt *node) -{ - WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); - WRITE_STRING_FIELD(indexname, indexname, indexname); - WRITE_LIST_FIELD(params, params, params); + WRITE_NODE_PTR_FIELD(node, node, node); + WRITE_ENUM_FIELD(SortByDir, sortby_dir, sortby_dir, sortby_dir); + WRITE_ENUM_FIELD(SortByNulls, sortby_nulls, sortby_nulls, sortby_nulls); + WRITE_LIST_FIELD(use_op, useOp, useOp); + WRITE_INT_FIELD(location, location, location); } static void -_outCopyStmt(OUT_TYPE(CopyStmt, CopyStmt) out, const CopyStmt *node) +_outWindowDef(OUT_TYPE(WindowDef, WindowDef) out, const WindowDef *node) { - WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); - WRITE_NODE_PTR_FIELD(query, query, query); - WRITE_LIST_FIELD(attlist, attlist, attlist); - WRITE_BOOL_FIELD(is_from, is_from, is_from); - WRITE_BOOL_FIELD(is_program, is_program, is_program); - WRITE_STRING_FIELD(filename, filename, filename); - WRITE_LIST_FIELD(options, options, options); - WRITE_NODE_PTR_FIELD(where_clause, whereClause, whereClause); + WRITE_STRING_FIELD(name, name, name); + WRITE_STRING_FIELD(refname, refname, refname); + WRITE_LIST_FIELD(partition_clause, partitionClause, partitionClause); + WRITE_LIST_FIELD(order_clause, orderClause, orderClause); + WRITE_INT_FIELD(frame_options, frameOptions, frameOptions); + WRITE_NODE_PTR_FIELD(start_offset, startOffset, startOffset); + WRITE_NODE_PTR_FIELD(end_offset, endOffset, endOffset); + WRITE_INT_FIELD(location, location, location); } static void -_outCreateStmt(OUT_TYPE(CreateStmt, CreateStmt) out, const CreateStmt *node) +_outRangeSubselect(OUT_TYPE(RangeSubselect, RangeSubselect) out, const RangeSubselect *node) { - WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); - WRITE_LIST_FIELD(table_elts, tableElts, tableElts); - WRITE_LIST_FIELD(inh_relations, inhRelations, inhRelations); - WRITE_SPECIFIC_NODE_PTR_FIELD(PartitionBoundSpec, partition_bound_spec, partbound, partbound, partbound); - WRITE_SPECIFIC_NODE_PTR_FIELD(PartitionSpec, partition_spec, partspec, partspec, partspec); - WRITE_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, of_typename, ofTypename, ofTypename); - WRITE_LIST_FIELD(constraints, constraints, constraints); - WRITE_LIST_FIELD(options, options, options); - WRITE_ENUM_FIELD(OnCommitAction, oncommit, oncommit, oncommit); - WRITE_STRING_FIELD(tablespacename, tablespacename, tablespacename); - WRITE_STRING_FIELD(access_method, accessMethod, accessMethod); - WRITE_BOOL_FIELD(if_not_exists, if_not_exists, if_not_exists); + WRITE_BOOL_FIELD(lateral, lateral, lateral); + WRITE_NODE_PTR_FIELD(subquery, subquery, subquery); + WRITE_SPECIFIC_NODE_PTR_FIELD(Alias, alias, alias, alias, alias); } static void -_outDefineStmt(OUT_TYPE(DefineStmt, DefineStmt) out, const DefineStmt *node) +_outRangeFunction(OUT_TYPE(RangeFunction, RangeFunction) out, const RangeFunction *node) { - WRITE_ENUM_FIELD(ObjectType, kind, kind, kind); - WRITE_BOOL_FIELD(oldstyle, oldstyle, oldstyle); - WRITE_LIST_FIELD(defnames, defnames, defnames); - WRITE_LIST_FIELD(args, args, args); - WRITE_LIST_FIELD(definition, definition, definition); - WRITE_BOOL_FIELD(if_not_exists, if_not_exists, if_not_exists); - WRITE_BOOL_FIELD(replace, replace, replace); + WRITE_BOOL_FIELD(lateral, lateral, lateral); + WRITE_BOOL_FIELD(ordinality, ordinality, ordinality); + WRITE_BOOL_FIELD(is_rowsfrom, is_rowsfrom, is_rowsfrom); + WRITE_LIST_FIELD(functions, functions, functions); + WRITE_SPECIFIC_NODE_PTR_FIELD(Alias, alias, alias, alias, alias); + WRITE_LIST_FIELD(coldeflist, coldeflist, coldeflist); } static void -_outDropStmt(OUT_TYPE(DropStmt, DropStmt) out, const DropStmt *node) +_outRangeTableFunc(OUT_TYPE(RangeTableFunc, RangeTableFunc) out, const RangeTableFunc *node) { - WRITE_LIST_FIELD(objects, objects, objects); - WRITE_ENUM_FIELD(ObjectType, remove_type, removeType, removeType); - WRITE_ENUM_FIELD(DropBehavior, behavior, behavior, behavior); - WRITE_BOOL_FIELD(missing_ok, missing_ok, missing_ok); - WRITE_BOOL_FIELD(concurrent, concurrent, concurrent); + WRITE_BOOL_FIELD(lateral, lateral, lateral); + WRITE_NODE_PTR_FIELD(docexpr, docexpr, docexpr); + WRITE_NODE_PTR_FIELD(rowexpr, rowexpr, rowexpr); + WRITE_LIST_FIELD(namespaces, namespaces, namespaces); + WRITE_LIST_FIELD(columns, columns, columns); + WRITE_SPECIFIC_NODE_PTR_FIELD(Alias, alias, alias, alias, alias); + WRITE_INT_FIELD(location, location, location); } static void -_outTruncateStmt(OUT_TYPE(TruncateStmt, TruncateStmt) out, const TruncateStmt *node) +_outRangeTableFuncCol(OUT_TYPE(RangeTableFuncCol, RangeTableFuncCol) out, const RangeTableFuncCol *node) { - WRITE_LIST_FIELD(relations, relations, relations); - WRITE_BOOL_FIELD(restart_seqs, restart_seqs, restart_seqs); - WRITE_ENUM_FIELD(DropBehavior, behavior, behavior, behavior); + WRITE_STRING_FIELD(colname, colname, colname); + WRITE_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, type_name, typeName, typeName); + WRITE_BOOL_FIELD(for_ordinality, for_ordinality, for_ordinality); + WRITE_BOOL_FIELD(is_not_null, is_not_null, is_not_null); + WRITE_NODE_PTR_FIELD(colexpr, colexpr, colexpr); + WRITE_NODE_PTR_FIELD(coldefexpr, coldefexpr, coldefexpr); + WRITE_INT_FIELD(location, location, location); } static void -_outCommentStmt(OUT_TYPE(CommentStmt, CommentStmt) out, const CommentStmt *node) +_outRangeTableSample(OUT_TYPE(RangeTableSample, RangeTableSample) out, const RangeTableSample *node) { - WRITE_ENUM_FIELD(ObjectType, objtype, objtype, objtype); - WRITE_NODE_PTR_FIELD(object, object, object); - WRITE_STRING_FIELD(comment, comment, comment); + WRITE_NODE_PTR_FIELD(relation, relation, relation); + WRITE_LIST_FIELD(method, method, method); + WRITE_LIST_FIELD(args, args, args); + WRITE_NODE_PTR_FIELD(repeatable, repeatable, repeatable); + WRITE_INT_FIELD(location, location, location); } static void -_outFetchStmt(OUT_TYPE(FetchStmt, FetchStmt) out, const FetchStmt *node) +_outColumnDef(OUT_TYPE(ColumnDef, ColumnDef) out, const ColumnDef *node) { - WRITE_ENUM_FIELD(FetchDirection, direction, direction, direction); - WRITE_LONG_FIELD(how_many, howMany, howMany); - WRITE_STRING_FIELD(portalname, portalname, portalname); - WRITE_BOOL_FIELD(ismove, ismove, ismove); + WRITE_STRING_FIELD(colname, colname, colname); + WRITE_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, type_name, typeName, typeName); + WRITE_STRING_FIELD(compression, compression, compression); + WRITE_INT_FIELD(inhcount, inhcount, inhcount); + WRITE_BOOL_FIELD(is_local, is_local, is_local); + WRITE_BOOL_FIELD(is_not_null, is_not_null, is_not_null); + WRITE_BOOL_FIELD(is_from_type, is_from_type, is_from_type); + WRITE_CHAR_FIELD(storage, storage, storage); + WRITE_STRING_FIELD(storage_name, storage_name, storage_name); + WRITE_NODE_PTR_FIELD(raw_default, raw_default, raw_default); + WRITE_NODE_PTR_FIELD(cooked_default, cooked_default, cooked_default); + WRITE_CHAR_FIELD(identity, identity, identity); + WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, identity_sequence, identitySequence, identitySequence); + WRITE_CHAR_FIELD(generated, generated, generated); + WRITE_SPECIFIC_NODE_PTR_FIELD(CollateClause, collate_clause, coll_clause, collClause, collClause); + WRITE_UINT_FIELD(coll_oid, collOid, collOid); + WRITE_LIST_FIELD(constraints, constraints, constraints); + WRITE_LIST_FIELD(fdwoptions, fdwoptions, fdwoptions); + WRITE_INT_FIELD(location, location, location); } static void -_outIndexStmt(OUT_TYPE(IndexStmt, IndexStmt) out, const IndexStmt *node) +_outTableLikeClause(OUT_TYPE(TableLikeClause, TableLikeClause) out, const TableLikeClause *node) { - WRITE_STRING_FIELD(idxname, idxname, idxname); WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); - WRITE_STRING_FIELD(access_method, accessMethod, accessMethod); - WRITE_STRING_FIELD(table_space, tableSpace, tableSpace); - WRITE_LIST_FIELD(index_params, indexParams, indexParams); - WRITE_LIST_FIELD(index_including_params, indexIncludingParams, indexIncludingParams); - WRITE_LIST_FIELD(options, options, options); - WRITE_NODE_PTR_FIELD(where_clause, whereClause, whereClause); - WRITE_LIST_FIELD(exclude_op_names, excludeOpNames, excludeOpNames); - WRITE_STRING_FIELD(idxcomment, idxcomment, idxcomment); - WRITE_UINT_FIELD(index_oid, indexOid, indexOid); - WRITE_UINT_FIELD(old_node, oldNode, oldNode); - WRITE_UINT_FIELD(old_create_subid, oldCreateSubid, oldCreateSubid); - WRITE_UINT_FIELD(old_first_relfilenode_subid, oldFirstRelfilenodeSubid, oldFirstRelfilenodeSubid); - WRITE_BOOL_FIELD(unique, unique, unique); - WRITE_BOOL_FIELD(nulls_not_distinct, nulls_not_distinct, nulls_not_distinct); - WRITE_BOOL_FIELD(primary, primary, primary); - WRITE_BOOL_FIELD(isconstraint, isconstraint, isconstraint); - WRITE_BOOL_FIELD(deferrable, deferrable, deferrable); - WRITE_BOOL_FIELD(initdeferred, initdeferred, initdeferred); - WRITE_BOOL_FIELD(transformed, transformed, transformed); - WRITE_BOOL_FIELD(concurrent, concurrent, concurrent); - WRITE_BOOL_FIELD(if_not_exists, if_not_exists, if_not_exists); - WRITE_BOOL_FIELD(reset_default_tblspc, reset_default_tblspc, reset_default_tblspc); -} - -static void -_outCreateFunctionStmt(OUT_TYPE(CreateFunctionStmt, CreateFunctionStmt) out, const CreateFunctionStmt *node) -{ - WRITE_BOOL_FIELD(is_procedure, is_procedure, is_procedure); - WRITE_BOOL_FIELD(replace, replace, replace); - WRITE_LIST_FIELD(funcname, funcname, funcname); - WRITE_LIST_FIELD(parameters, parameters, parameters); - WRITE_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, return_type, returnType, returnType); - WRITE_LIST_FIELD(options, options, options); - WRITE_NODE_PTR_FIELD(sql_body, sql_body, sql_body); + WRITE_UINT_FIELD(options, options, options); + WRITE_UINT_FIELD(relation_oid, relationOid, relationOid); } static void -_outAlterFunctionStmt(OUT_TYPE(AlterFunctionStmt, AlterFunctionStmt) out, const AlterFunctionStmt *node) +_outIndexElem(OUT_TYPE(IndexElem, IndexElem) out, const IndexElem *node) { - WRITE_ENUM_FIELD(ObjectType, objtype, objtype, objtype); - WRITE_SPECIFIC_NODE_PTR_FIELD(ObjectWithArgs, object_with_args, func, func, func); - WRITE_LIST_FIELD(actions, actions, actions); + WRITE_STRING_FIELD(name, name, name); + WRITE_NODE_PTR_FIELD(expr, expr, expr); + WRITE_STRING_FIELD(indexcolname, indexcolname, indexcolname); + WRITE_LIST_FIELD(collation, collation, collation); + WRITE_LIST_FIELD(opclass, opclass, opclass); + WRITE_LIST_FIELD(opclassopts, opclassopts, opclassopts); + WRITE_ENUM_FIELD(SortByDir, ordering, ordering, ordering); + WRITE_ENUM_FIELD(SortByNulls, nulls_ordering, nulls_ordering, nulls_ordering); } static void -_outDoStmt(OUT_TYPE(DoStmt, DoStmt) out, const DoStmt *node) +_outDefElem(OUT_TYPE(DefElem, DefElem) out, const DefElem *node) { - WRITE_LIST_FIELD(args, args, args); + WRITE_STRING_FIELD(defnamespace, defnamespace, defnamespace); + WRITE_STRING_FIELD(defname, defname, defname); + WRITE_NODE_PTR_FIELD(arg, arg, arg); + WRITE_ENUM_FIELD(DefElemAction, defaction, defaction, defaction); + WRITE_INT_FIELD(location, location, location); } static void -_outRenameStmt(OUT_TYPE(RenameStmt, RenameStmt) out, const RenameStmt *node) +_outLockingClause(OUT_TYPE(LockingClause, LockingClause) out, const LockingClause *node) { - WRITE_ENUM_FIELD(ObjectType, rename_type, renameType, renameType); - WRITE_ENUM_FIELD(ObjectType, relation_type, relationType, relationType); - WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); - WRITE_NODE_PTR_FIELD(object, object, object); - WRITE_STRING_FIELD(subname, subname, subname); - WRITE_STRING_FIELD(newname, newname, newname); - WRITE_ENUM_FIELD(DropBehavior, behavior, behavior, behavior); - WRITE_BOOL_FIELD(missing_ok, missing_ok, missing_ok); + WRITE_LIST_FIELD(locked_rels, lockedRels, lockedRels); + WRITE_ENUM_FIELD(LockClauseStrength, strength, strength, strength); + WRITE_ENUM_FIELD(LockWaitPolicy, wait_policy, waitPolicy, waitPolicy); } static void -_outRuleStmt(OUT_TYPE(RuleStmt, RuleStmt) out, const RuleStmt *node) +_outXmlSerialize(OUT_TYPE(XmlSerialize, XmlSerialize) out, const XmlSerialize *node) { - WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); - WRITE_STRING_FIELD(rulename, rulename, rulename); - WRITE_NODE_PTR_FIELD(where_clause, whereClause, whereClause); - WRITE_ENUM_FIELD(CmdType, event, event, event); - WRITE_BOOL_FIELD(instead, instead, instead); - WRITE_LIST_FIELD(actions, actions, actions); - WRITE_BOOL_FIELD(replace, replace, replace); + WRITE_ENUM_FIELD(XmlOptionType, xmloption, xmloption, xmloption); + WRITE_NODE_PTR_FIELD(expr, expr, expr); + WRITE_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, type_name, typeName, typeName); + WRITE_BOOL_FIELD(indent, indent, indent); + WRITE_INT_FIELD(location, location, location); } static void -_outNotifyStmt(OUT_TYPE(NotifyStmt, NotifyStmt) out, const NotifyStmt *node) +_outPartitionElem(OUT_TYPE(PartitionElem, PartitionElem) out, const PartitionElem *node) { - WRITE_STRING_FIELD(conditionname, conditionname, conditionname); - WRITE_STRING_FIELD(payload, payload, payload); + WRITE_STRING_FIELD(name, name, name); + WRITE_NODE_PTR_FIELD(expr, expr, expr); + WRITE_LIST_FIELD(collation, collation, collation); + WRITE_LIST_FIELD(opclass, opclass, opclass); + WRITE_INT_FIELD(location, location, location); } static void -_outListenStmt(OUT_TYPE(ListenStmt, ListenStmt) out, const ListenStmt *node) +_outPartitionSpec(OUT_TYPE(PartitionSpec, PartitionSpec) out, const PartitionSpec *node) { - WRITE_STRING_FIELD(conditionname, conditionname, conditionname); + WRITE_ENUM_FIELD(PartitionStrategy, strategy, strategy, strategy); + WRITE_LIST_FIELD(part_params, partParams, partParams); + WRITE_INT_FIELD(location, location, location); } static void -_outUnlistenStmt(OUT_TYPE(UnlistenStmt, UnlistenStmt) out, const UnlistenStmt *node) +_outPartitionBoundSpec(OUT_TYPE(PartitionBoundSpec, PartitionBoundSpec) out, const PartitionBoundSpec *node) { - WRITE_STRING_FIELD(conditionname, conditionname, conditionname); + WRITE_CHAR_FIELD(strategy, strategy, strategy); + WRITE_BOOL_FIELD(is_default, is_default, is_default); + WRITE_INT_FIELD(modulus, modulus, modulus); + WRITE_INT_FIELD(remainder, remainder, remainder); + WRITE_LIST_FIELD(listdatums, listdatums, listdatums); + WRITE_LIST_FIELD(lowerdatums, lowerdatums, lowerdatums); + WRITE_LIST_FIELD(upperdatums, upperdatums, upperdatums); + WRITE_INT_FIELD(location, location, location); } static void -_outTransactionStmt(OUT_TYPE(TransactionStmt, TransactionStmt) out, const TransactionStmt *node) +_outPartitionRangeDatum(OUT_TYPE(PartitionRangeDatum, PartitionRangeDatum) out, const PartitionRangeDatum *node) { - WRITE_ENUM_FIELD(TransactionStmtKind, kind, kind, kind); - WRITE_LIST_FIELD(options, options, options); - WRITE_STRING_FIELD(savepoint_name, savepoint_name, savepoint_name); - WRITE_STRING_FIELD(gid, gid, gid); - WRITE_BOOL_FIELD(chain, chain, chain); + WRITE_ENUM_FIELD(PartitionRangeDatumKind, kind, kind, kind); + WRITE_NODE_PTR_FIELD(value, value, value); + WRITE_INT_FIELD(location, location, location); } static void -_outViewStmt(OUT_TYPE(ViewStmt, ViewStmt) out, const ViewStmt *node) +_outPartitionCmd(OUT_TYPE(PartitionCmd, PartitionCmd) out, const PartitionCmd *node) { - WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, view, view, view); - WRITE_LIST_FIELD(aliases, aliases, aliases); - WRITE_NODE_PTR_FIELD(query, query, query); - WRITE_BOOL_FIELD(replace, replace, replace); - WRITE_LIST_FIELD(options, options, options); - WRITE_ENUM_FIELD(ViewCheckOption, with_check_option, withCheckOption, withCheckOption); + WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, name, name, name); + WRITE_SPECIFIC_NODE_PTR_FIELD(PartitionBoundSpec, partition_bound_spec, bound, bound, bound); + WRITE_BOOL_FIELD(concurrent, concurrent, concurrent); } static void -_outLoadStmt(OUT_TYPE(LoadStmt, LoadStmt) out, const LoadStmt *node) +_outRangeTblEntry(OUT_TYPE(RangeTblEntry, RangeTblEntry) out, const RangeTblEntry *node) { - WRITE_STRING_FIELD(filename, filename, filename); -} - -static void -_outCreateDomainStmt(OUT_TYPE(CreateDomainStmt, CreateDomainStmt) out, const CreateDomainStmt *node) -{ - WRITE_LIST_FIELD(domainname, domainname, domainname); - WRITE_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, type_name, typeName, typeName); - WRITE_SPECIFIC_NODE_PTR_FIELD(CollateClause, collate_clause, coll_clause, collClause, collClause); - WRITE_LIST_FIELD(constraints, constraints, constraints); + WRITE_ENUM_FIELD(RTEKind, rtekind, rtekind, rtekind); + WRITE_UINT_FIELD(relid, relid, relid); + WRITE_CHAR_FIELD(relkind, relkind, relkind); + WRITE_INT_FIELD(rellockmode, rellockmode, rellockmode); + WRITE_SPECIFIC_NODE_PTR_FIELD(TableSampleClause, table_sample_clause, tablesample, tablesample, tablesample); + WRITE_UINT_FIELD(perminfoindex, perminfoindex, perminfoindex); + WRITE_SPECIFIC_NODE_PTR_FIELD(Query, query, subquery, subquery, subquery); + WRITE_BOOL_FIELD(security_barrier, security_barrier, security_barrier); + WRITE_ENUM_FIELD(JoinType, jointype, jointype, jointype); + WRITE_INT_FIELD(joinmergedcols, joinmergedcols, joinmergedcols); + WRITE_LIST_FIELD(joinaliasvars, joinaliasvars, joinaliasvars); + WRITE_LIST_FIELD(joinleftcols, joinleftcols, joinleftcols); + WRITE_LIST_FIELD(joinrightcols, joinrightcols, joinrightcols); + WRITE_SPECIFIC_NODE_PTR_FIELD(Alias, alias, join_using_alias, join_using_alias, join_using_alias); + WRITE_LIST_FIELD(functions, functions, functions); + WRITE_BOOL_FIELD(funcordinality, funcordinality, funcordinality); + WRITE_SPECIFIC_NODE_PTR_FIELD(TableFunc, table_func, tablefunc, tablefunc, tablefunc); + WRITE_LIST_FIELD(values_lists, values_lists, values_lists); + WRITE_STRING_FIELD(ctename, ctename, ctename); + WRITE_UINT_FIELD(ctelevelsup, ctelevelsup, ctelevelsup); + WRITE_BOOL_FIELD(self_reference, self_reference, self_reference); + WRITE_LIST_FIELD(coltypes, coltypes, coltypes); + WRITE_LIST_FIELD(coltypmods, coltypmods, coltypmods); + WRITE_LIST_FIELD(colcollations, colcollations, colcollations); + WRITE_STRING_FIELD(enrname, enrname, enrname); + WRITE_FLOAT_FIELD(enrtuples, enrtuples, enrtuples); + WRITE_SPECIFIC_NODE_PTR_FIELD(Alias, alias, alias, alias, alias); + WRITE_SPECIFIC_NODE_PTR_FIELD(Alias, alias, eref, eref, eref); + WRITE_BOOL_FIELD(lateral, lateral, lateral); + WRITE_BOOL_FIELD(inh, inh, inh); + WRITE_BOOL_FIELD(in_from_cl, inFromCl, inFromCl); + WRITE_LIST_FIELD(security_quals, securityQuals, securityQuals); } static void -_outCreatedbStmt(OUT_TYPE(CreatedbStmt, CreatedbStmt) out, const CreatedbStmt *node) +_outRTEPermissionInfo(OUT_TYPE(RTEPermissionInfo, RTEPermissionInfo) out, const RTEPermissionInfo *node) { - WRITE_STRING_FIELD(dbname, dbname, dbname); - WRITE_LIST_FIELD(options, options, options); + WRITE_UINT_FIELD(relid, relid, relid); + WRITE_BOOL_FIELD(inh, inh, inh); + WRITE_LONG_FIELD(required_perms, requiredPerms, requiredPerms); + WRITE_UINT_FIELD(check_as_user, checkAsUser, checkAsUser); + WRITE_BITMAPSET_FIELD(selected_cols, selectedCols, selectedCols); + WRITE_BITMAPSET_FIELD(inserted_cols, insertedCols, insertedCols); + WRITE_BITMAPSET_FIELD(updated_cols, updatedCols, updatedCols); } static void -_outDropdbStmt(OUT_TYPE(DropdbStmt, DropdbStmt) out, const DropdbStmt *node) +_outRangeTblFunction(OUT_TYPE(RangeTblFunction, RangeTblFunction) out, const RangeTblFunction *node) { - WRITE_STRING_FIELD(dbname, dbname, dbname); - WRITE_BOOL_FIELD(missing_ok, missing_ok, missing_ok); - WRITE_LIST_FIELD(options, options, options); + WRITE_NODE_PTR_FIELD(funcexpr, funcexpr, funcexpr); + WRITE_INT_FIELD(funccolcount, funccolcount, funccolcount); + WRITE_LIST_FIELD(funccolnames, funccolnames, funccolnames); + WRITE_LIST_FIELD(funccoltypes, funccoltypes, funccoltypes); + WRITE_LIST_FIELD(funccoltypmods, funccoltypmods, funccoltypmods); + WRITE_LIST_FIELD(funccolcollations, funccolcollations, funccolcollations); + WRITE_BITMAPSET_FIELD(funcparams, funcparams, funcparams); } static void -_outVacuumStmt(OUT_TYPE(VacuumStmt, VacuumStmt) out, const VacuumStmt *node) +_outTableSampleClause(OUT_TYPE(TableSampleClause, TableSampleClause) out, const TableSampleClause *node) { - WRITE_LIST_FIELD(options, options, options); - WRITE_LIST_FIELD(rels, rels, rels); - WRITE_BOOL_FIELD(is_vacuumcmd, is_vacuumcmd, is_vacuumcmd); + WRITE_UINT_FIELD(tsmhandler, tsmhandler, tsmhandler); + WRITE_LIST_FIELD(args, args, args); + WRITE_NODE_PTR_FIELD(repeatable, repeatable, repeatable); } static void -_outExplainStmt(OUT_TYPE(ExplainStmt, ExplainStmt) out, const ExplainStmt *node) +_outWithCheckOption(OUT_TYPE(WithCheckOption, WithCheckOption) out, const WithCheckOption *node) { - WRITE_NODE_PTR_FIELD(query, query, query); - WRITE_LIST_FIELD(options, options, options); + WRITE_ENUM_FIELD(WCOKind, kind, kind, kind); + WRITE_STRING_FIELD(relname, relname, relname); + WRITE_STRING_FIELD(polname, polname, polname); + WRITE_NODE_PTR_FIELD(qual, qual, qual); + WRITE_BOOL_FIELD(cascaded, cascaded, cascaded); } static void -_outCreateTableAsStmt(OUT_TYPE(CreateTableAsStmt, CreateTableAsStmt) out, const CreateTableAsStmt *node) +_outSortGroupClause(OUT_TYPE(SortGroupClause, SortGroupClause) out, const SortGroupClause *node) { - WRITE_NODE_PTR_FIELD(query, query, query); - WRITE_SPECIFIC_NODE_PTR_FIELD(IntoClause, into_clause, into, into, into); - WRITE_ENUM_FIELD(ObjectType, objtype, objtype, objtype); - WRITE_BOOL_FIELD(is_select_into, is_select_into, is_select_into); - WRITE_BOOL_FIELD(if_not_exists, if_not_exists, if_not_exists); + WRITE_UINT_FIELD(tle_sort_group_ref, tleSortGroupRef, tleSortGroupRef); + WRITE_UINT_FIELD(eqop, eqop, eqop); + WRITE_UINT_FIELD(sortop, sortop, sortop); + WRITE_BOOL_FIELD(nulls_first, nulls_first, nulls_first); + WRITE_BOOL_FIELD(hashable, hashable, hashable); } static void -_outCreateSeqStmt(OUT_TYPE(CreateSeqStmt, CreateSeqStmt) out, const CreateSeqStmt *node) +_outGroupingSet(OUT_TYPE(GroupingSet, GroupingSet) out, const GroupingSet *node) { - WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, sequence, sequence, sequence); - WRITE_LIST_FIELD(options, options, options); - WRITE_UINT_FIELD(owner_id, ownerId, ownerId); - WRITE_BOOL_FIELD(for_identity, for_identity, for_identity); - WRITE_BOOL_FIELD(if_not_exists, if_not_exists, if_not_exists); + WRITE_ENUM_FIELD(GroupingSetKind, kind, kind, kind); + WRITE_LIST_FIELD(content, content, content); + WRITE_INT_FIELD(location, location, location); } static void -_outAlterSeqStmt(OUT_TYPE(AlterSeqStmt, AlterSeqStmt) out, const AlterSeqStmt *node) +_outWindowClause(OUT_TYPE(WindowClause, WindowClause) out, const WindowClause *node) { - WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, sequence, sequence, sequence); - WRITE_LIST_FIELD(options, options, options); - WRITE_BOOL_FIELD(for_identity, for_identity, for_identity); - WRITE_BOOL_FIELD(missing_ok, missing_ok, missing_ok); + WRITE_STRING_FIELD(name, name, name); + WRITE_STRING_FIELD(refname, refname, refname); + WRITE_LIST_FIELD(partition_clause, partitionClause, partitionClause); + WRITE_LIST_FIELD(order_clause, orderClause, orderClause); + WRITE_INT_FIELD(frame_options, frameOptions, frameOptions); + WRITE_NODE_PTR_FIELD(start_offset, startOffset, startOffset); + WRITE_NODE_PTR_FIELD(end_offset, endOffset, endOffset); + WRITE_LIST_FIELD(run_condition, runCondition, runCondition); + WRITE_UINT_FIELD(start_in_range_func, startInRangeFunc, startInRangeFunc); + WRITE_UINT_FIELD(end_in_range_func, endInRangeFunc, endInRangeFunc); + WRITE_UINT_FIELD(in_range_coll, inRangeColl, inRangeColl); + WRITE_BOOL_FIELD(in_range_asc, inRangeAsc, inRangeAsc); + WRITE_BOOL_FIELD(in_range_nulls_first, inRangeNullsFirst, inRangeNullsFirst); + WRITE_UINT_FIELD(winref, winref, winref); + WRITE_BOOL_FIELD(copied_order, copiedOrder, copiedOrder); } static void -_outVariableSetStmt(OUT_TYPE(VariableSetStmt, VariableSetStmt) out, const VariableSetStmt *node) +_outRowMarkClause(OUT_TYPE(RowMarkClause, RowMarkClause) out, const RowMarkClause *node) { - WRITE_ENUM_FIELD(VariableSetKind, kind, kind, kind); - WRITE_STRING_FIELD(name, name, name); - WRITE_LIST_FIELD(args, args, args); - WRITE_BOOL_FIELD(is_local, is_local, is_local); + WRITE_UINT_FIELD(rti, rti, rti); + WRITE_ENUM_FIELD(LockClauseStrength, strength, strength, strength); + WRITE_ENUM_FIELD(LockWaitPolicy, wait_policy, waitPolicy, waitPolicy); + WRITE_BOOL_FIELD(pushed_down, pushedDown, pushedDown); } static void -_outVariableShowStmt(OUT_TYPE(VariableShowStmt, VariableShowStmt) out, const VariableShowStmt *node) +_outWithClause(OUT_TYPE(WithClause, WithClause) out, const WithClause *node) { - WRITE_STRING_FIELD(name, name, name); + WRITE_LIST_FIELD(ctes, ctes, ctes); + WRITE_BOOL_FIELD(recursive, recursive, recursive); + WRITE_INT_FIELD(location, location, location); } static void -_outDiscardStmt(OUT_TYPE(DiscardStmt, DiscardStmt) out, const DiscardStmt *node) +_outInferClause(OUT_TYPE(InferClause, InferClause) out, const InferClause *node) { - WRITE_ENUM_FIELD(DiscardMode, target, target, target); + WRITE_LIST_FIELD(index_elems, indexElems, indexElems); + WRITE_NODE_PTR_FIELD(where_clause, whereClause, whereClause); + WRITE_STRING_FIELD(conname, conname, conname); + WRITE_INT_FIELD(location, location, location); } static void -_outCreateTrigStmt(OUT_TYPE(CreateTrigStmt, CreateTrigStmt) out, const CreateTrigStmt *node) +_outOnConflictClause(OUT_TYPE(OnConflictClause, OnConflictClause) out, const OnConflictClause *node) { - WRITE_BOOL_FIELD(replace, replace, replace); - WRITE_BOOL_FIELD(isconstraint, isconstraint, isconstraint); - WRITE_STRING_FIELD(trigname, trigname, trigname); - WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); - WRITE_LIST_FIELD(funcname, funcname, funcname); - WRITE_LIST_FIELD(args, args, args); - WRITE_BOOL_FIELD(row, row, row); - WRITE_INT_FIELD(timing, timing, timing); - WRITE_INT_FIELD(events, events, events); - WRITE_LIST_FIELD(columns, columns, columns); - WRITE_NODE_PTR_FIELD(when_clause, whenClause, whenClause); - WRITE_LIST_FIELD(transition_rels, transitionRels, transitionRels); - WRITE_BOOL_FIELD(deferrable, deferrable, deferrable); - WRITE_BOOL_FIELD(initdeferred, initdeferred, initdeferred); - WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, constrrel, constrrel, constrrel); + WRITE_ENUM_FIELD(OnConflictAction, action, action, action); + WRITE_SPECIFIC_NODE_PTR_FIELD(InferClause, infer_clause, infer, infer, infer); + WRITE_LIST_FIELD(target_list, targetList, targetList); + WRITE_NODE_PTR_FIELD(where_clause, whereClause, whereClause); + WRITE_INT_FIELD(location, location, location); } static void -_outCreatePLangStmt(OUT_TYPE(CreatePLangStmt, CreatePLangStmt) out, const CreatePLangStmt *node) +_outCTESearchClause(OUT_TYPE(CTESearchClause, CTESearchClause) out, const CTESearchClause *node) { - WRITE_BOOL_FIELD(replace, replace, replace); - WRITE_STRING_FIELD(plname, plname, plname); - WRITE_LIST_FIELD(plhandler, plhandler, plhandler); - WRITE_LIST_FIELD(plinline, plinline, plinline); - WRITE_LIST_FIELD(plvalidator, plvalidator, plvalidator); - WRITE_BOOL_FIELD(pltrusted, pltrusted, pltrusted); + WRITE_LIST_FIELD(search_col_list, search_col_list, search_col_list); + WRITE_BOOL_FIELD(search_breadth_first, search_breadth_first, search_breadth_first); + WRITE_STRING_FIELD(search_seq_column, search_seq_column, search_seq_column); + WRITE_INT_FIELD(location, location, location); } static void -_outCreateRoleStmt(OUT_TYPE(CreateRoleStmt, CreateRoleStmt) out, const CreateRoleStmt *node) +_outCTECycleClause(OUT_TYPE(CTECycleClause, CTECycleClause) out, const CTECycleClause *node) { - WRITE_ENUM_FIELD(RoleStmtType, stmt_type, stmt_type, stmt_type); - WRITE_STRING_FIELD(role, role, role); - WRITE_LIST_FIELD(options, options, options); + WRITE_LIST_FIELD(cycle_col_list, cycle_col_list, cycle_col_list); + WRITE_STRING_FIELD(cycle_mark_column, cycle_mark_column, cycle_mark_column); + WRITE_NODE_PTR_FIELD(cycle_mark_value, cycle_mark_value, cycle_mark_value); + WRITE_NODE_PTR_FIELD(cycle_mark_default, cycle_mark_default, cycle_mark_default); + WRITE_STRING_FIELD(cycle_path_column, cycle_path_column, cycle_path_column); + WRITE_INT_FIELD(location, location, location); + WRITE_UINT_FIELD(cycle_mark_type, cycle_mark_type, cycle_mark_type); + WRITE_INT_FIELD(cycle_mark_typmod, cycle_mark_typmod, cycle_mark_typmod); + WRITE_UINT_FIELD(cycle_mark_collation, cycle_mark_collation, cycle_mark_collation); + WRITE_UINT_FIELD(cycle_mark_neop, cycle_mark_neop, cycle_mark_neop); } static void -_outAlterRoleStmt(OUT_TYPE(AlterRoleStmt, AlterRoleStmt) out, const AlterRoleStmt *node) +_outCommonTableExpr(OUT_TYPE(CommonTableExpr, CommonTableExpr) out, const CommonTableExpr *node) { - WRITE_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, role, role, role); - WRITE_LIST_FIELD(options, options, options); - WRITE_INT_FIELD(action, action, action); + WRITE_STRING_FIELD(ctename, ctename, ctename); + WRITE_LIST_FIELD(aliascolnames, aliascolnames, aliascolnames); + WRITE_ENUM_FIELD(CTEMaterialize, ctematerialized, ctematerialized, ctematerialized); + WRITE_NODE_PTR_FIELD(ctequery, ctequery, ctequery); + WRITE_SPECIFIC_NODE_PTR_FIELD(CTESearchClause, ctesearch_clause, search_clause, search_clause, search_clause); + WRITE_SPECIFIC_NODE_PTR_FIELD(CTECycleClause, ctecycle_clause, cycle_clause, cycle_clause, cycle_clause); + WRITE_INT_FIELD(location, location, location); + WRITE_BOOL_FIELD(cterecursive, cterecursive, cterecursive); + WRITE_INT_FIELD(cterefcount, cterefcount, cterefcount); + WRITE_LIST_FIELD(ctecolnames, ctecolnames, ctecolnames); + WRITE_LIST_FIELD(ctecoltypes, ctecoltypes, ctecoltypes); + WRITE_LIST_FIELD(ctecoltypmods, ctecoltypmods, ctecoltypmods); + WRITE_LIST_FIELD(ctecolcollations, ctecolcollations, ctecolcollations); } static void -_outDropRoleStmt(OUT_TYPE(DropRoleStmt, DropRoleStmt) out, const DropRoleStmt *node) +_outMergeWhenClause(OUT_TYPE(MergeWhenClause, MergeWhenClause) out, const MergeWhenClause *node) { - WRITE_LIST_FIELD(roles, roles, roles); - WRITE_BOOL_FIELD(missing_ok, missing_ok, missing_ok); + WRITE_BOOL_FIELD(matched, matched, matched); + WRITE_ENUM_FIELD(CmdType, command_type, commandType, commandType); + WRITE_ENUM_FIELD(OverridingKind, override, override, override); + WRITE_NODE_PTR_FIELD(condition, condition, condition); + WRITE_LIST_FIELD(target_list, targetList, targetList); + WRITE_LIST_FIELD(values, values, values); } static void -_outLockStmt(OUT_TYPE(LockStmt, LockStmt) out, const LockStmt *node) +_outMergeAction(OUT_TYPE(MergeAction, MergeAction) out, const MergeAction *node) { - WRITE_LIST_FIELD(relations, relations, relations); - WRITE_INT_FIELD(mode, mode, mode); - WRITE_BOOL_FIELD(nowait, nowait, nowait); + WRITE_BOOL_FIELD(matched, matched, matched); + WRITE_ENUM_FIELD(CmdType, command_type, commandType, commandType); + WRITE_ENUM_FIELD(OverridingKind, override, override, override); + WRITE_NODE_PTR_FIELD(qual, qual, qual); + WRITE_LIST_FIELD(target_list, targetList, targetList); + WRITE_LIST_FIELD(update_colnos, updateColnos, updateColnos); } static void -_outConstraintsSetStmt(OUT_TYPE(ConstraintsSetStmt, ConstraintsSetStmt) out, const ConstraintsSetStmt *node) +_outTriggerTransition(OUT_TYPE(TriggerTransition, TriggerTransition) out, const TriggerTransition *node) { - WRITE_LIST_FIELD(constraints, constraints, constraints); - WRITE_BOOL_FIELD(deferred, deferred, deferred); + WRITE_STRING_FIELD(name, name, name); + WRITE_BOOL_FIELD(is_new, isNew, isNew); + WRITE_BOOL_FIELD(is_table, isTable, isTable); } static void -_outReindexStmt(OUT_TYPE(ReindexStmt, ReindexStmt) out, const ReindexStmt *node) +_outJsonOutput(OUT_TYPE(JsonOutput, JsonOutput) out, const JsonOutput *node) { - WRITE_ENUM_FIELD(ReindexObjectType, kind, kind, kind); - WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); - WRITE_STRING_FIELD(name, name, name); - WRITE_LIST_FIELD(params, params, params); + WRITE_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, type_name, typeName, typeName); + WRITE_SPECIFIC_NODE_PTR_FIELD(JsonReturning, json_returning, returning, returning, returning); } static void -_outCheckPointStmt(OUT_TYPE(CheckPointStmt, CheckPointStmt) out, const CheckPointStmt *node) +_outJsonKeyValue(OUT_TYPE(JsonKeyValue, JsonKeyValue) out, const JsonKeyValue *node) { + WRITE_NODE_PTR_FIELD(key, key, key); + WRITE_SPECIFIC_NODE_PTR_FIELD(JsonValueExpr, json_value_expr, value, value, value); } static void -_outCreateSchemaStmt(OUT_TYPE(CreateSchemaStmt, CreateSchemaStmt) out, const CreateSchemaStmt *node) +_outJsonObjectConstructor(OUT_TYPE(JsonObjectConstructor, JsonObjectConstructor) out, const JsonObjectConstructor *node) { - WRITE_STRING_FIELD(schemaname, schemaname, schemaname); - WRITE_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, authrole, authrole, authrole); - WRITE_LIST_FIELD(schema_elts, schemaElts, schemaElts); - WRITE_BOOL_FIELD(if_not_exists, if_not_exists, if_not_exists); + WRITE_LIST_FIELD(exprs, exprs, exprs); + WRITE_SPECIFIC_NODE_PTR_FIELD(JsonOutput, json_output, output, output, output); + WRITE_BOOL_FIELD(absent_on_null, absent_on_null, absent_on_null); + WRITE_BOOL_FIELD(unique, unique, unique); + WRITE_INT_FIELD(location, location, location); } static void -_outAlterDatabaseStmt(OUT_TYPE(AlterDatabaseStmt, AlterDatabaseStmt) out, const AlterDatabaseStmt *node) +_outJsonArrayConstructor(OUT_TYPE(JsonArrayConstructor, JsonArrayConstructor) out, const JsonArrayConstructor *node) { - WRITE_STRING_FIELD(dbname, dbname, dbname); - WRITE_LIST_FIELD(options, options, options); + WRITE_LIST_FIELD(exprs, exprs, exprs); + WRITE_SPECIFIC_NODE_PTR_FIELD(JsonOutput, json_output, output, output, output); + WRITE_BOOL_FIELD(absent_on_null, absent_on_null, absent_on_null); + WRITE_INT_FIELD(location, location, location); } static void -_outAlterDatabaseRefreshCollStmt(OUT_TYPE(AlterDatabaseRefreshCollStmt, AlterDatabaseRefreshCollStmt) out, const AlterDatabaseRefreshCollStmt *node) +_outJsonArrayQueryConstructor(OUT_TYPE(JsonArrayQueryConstructor, JsonArrayQueryConstructor) out, const JsonArrayQueryConstructor *node) { - WRITE_STRING_FIELD(dbname, dbname, dbname); + WRITE_NODE_PTR_FIELD(query, query, query); + WRITE_SPECIFIC_NODE_PTR_FIELD(JsonOutput, json_output, output, output, output); + WRITE_SPECIFIC_NODE_PTR_FIELD(JsonFormat, json_format, format, format, format); + WRITE_BOOL_FIELD(absent_on_null, absent_on_null, absent_on_null); + WRITE_INT_FIELD(location, location, location); } static void -_outAlterDatabaseSetStmt(OUT_TYPE(AlterDatabaseSetStmt, AlterDatabaseSetStmt) out, const AlterDatabaseSetStmt *node) +_outJsonAggConstructor(OUT_TYPE(JsonAggConstructor, JsonAggConstructor) out, const JsonAggConstructor *node) { - WRITE_STRING_FIELD(dbname, dbname, dbname); - WRITE_SPECIFIC_NODE_PTR_FIELD(VariableSetStmt, variable_set_stmt, setstmt, setstmt, setstmt); + WRITE_SPECIFIC_NODE_PTR_FIELD(JsonOutput, json_output, output, output, output); + WRITE_NODE_PTR_FIELD(agg_filter, agg_filter, agg_filter); + WRITE_LIST_FIELD(agg_order, agg_order, agg_order); + WRITE_SPECIFIC_NODE_PTR_FIELD(WindowDef, window_def, over, over, over); + WRITE_INT_FIELD(location, location, location); } static void -_outAlterRoleSetStmt(OUT_TYPE(AlterRoleSetStmt, AlterRoleSetStmt) out, const AlterRoleSetStmt *node) +_outJsonObjectAgg(OUT_TYPE(JsonObjectAgg, JsonObjectAgg) out, const JsonObjectAgg *node) { - WRITE_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, role, role, role); - WRITE_STRING_FIELD(database, database, database); - WRITE_SPECIFIC_NODE_PTR_FIELD(VariableSetStmt, variable_set_stmt, setstmt, setstmt, setstmt); + WRITE_SPECIFIC_NODE_PTR_FIELD(JsonAggConstructor, json_agg_constructor, constructor, constructor, constructor); + WRITE_SPECIFIC_NODE_PTR_FIELD(JsonKeyValue, json_key_value, arg, arg, arg); + WRITE_BOOL_FIELD(absent_on_null, absent_on_null, absent_on_null); + WRITE_BOOL_FIELD(unique, unique, unique); } static void -_outCreateConversionStmt(OUT_TYPE(CreateConversionStmt, CreateConversionStmt) out, const CreateConversionStmt *node) +_outJsonArrayAgg(OUT_TYPE(JsonArrayAgg, JsonArrayAgg) out, const JsonArrayAgg *node) { - WRITE_LIST_FIELD(conversion_name, conversion_name, conversion_name); - WRITE_STRING_FIELD(for_encoding_name, for_encoding_name, for_encoding_name); - WRITE_STRING_FIELD(to_encoding_name, to_encoding_name, to_encoding_name); - WRITE_LIST_FIELD(func_name, func_name, func_name); - WRITE_BOOL_FIELD(def, def, def); + WRITE_SPECIFIC_NODE_PTR_FIELD(JsonAggConstructor, json_agg_constructor, constructor, constructor, constructor); + WRITE_SPECIFIC_NODE_PTR_FIELD(JsonValueExpr, json_value_expr, arg, arg, arg); + WRITE_BOOL_FIELD(absent_on_null, absent_on_null, absent_on_null); } static void -_outCreateCastStmt(OUT_TYPE(CreateCastStmt, CreateCastStmt) out, const CreateCastStmt *node) +_outRawStmt(OUT_TYPE(RawStmt, RawStmt) out, const RawStmt *node) { - WRITE_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, sourcetype, sourcetype, sourcetype); - WRITE_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, targettype, targettype, targettype); - WRITE_SPECIFIC_NODE_PTR_FIELD(ObjectWithArgs, object_with_args, func, func, func); - WRITE_ENUM_FIELD(CoercionContext, context, context, context); - WRITE_BOOL_FIELD(inout, inout, inout); + WRITE_NODE_PTR_FIELD(stmt, stmt, stmt); + WRITE_INT_FIELD(stmt_location, stmt_location, stmt_location); + WRITE_INT_FIELD(stmt_len, stmt_len, stmt_len); } static void -_outCreateOpClassStmt(OUT_TYPE(CreateOpClassStmt, CreateOpClassStmt) out, const CreateOpClassStmt *node) +_outInsertStmt(OUT_TYPE(InsertStmt, InsertStmt) out, const InsertStmt *node) { - WRITE_LIST_FIELD(opclassname, opclassname, opclassname); - WRITE_LIST_FIELD(opfamilyname, opfamilyname, opfamilyname); - WRITE_STRING_FIELD(amname, amname, amname); - WRITE_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, datatype, datatype, datatype); - WRITE_LIST_FIELD(items, items, items); - WRITE_BOOL_FIELD(is_default, isDefault, isDefault); + WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); + WRITE_LIST_FIELD(cols, cols, cols); + WRITE_NODE_PTR_FIELD(select_stmt, selectStmt, selectStmt); + WRITE_SPECIFIC_NODE_PTR_FIELD(OnConflictClause, on_conflict_clause, on_conflict_clause, onConflictClause, onConflictClause); + WRITE_LIST_FIELD(returning_list, returningList, returningList); + WRITE_SPECIFIC_NODE_PTR_FIELD(WithClause, with_clause, with_clause, withClause, withClause); + WRITE_ENUM_FIELD(OverridingKind, override, override, override); } static void -_outCreateOpFamilyStmt(OUT_TYPE(CreateOpFamilyStmt, CreateOpFamilyStmt) out, const CreateOpFamilyStmt *node) +_outDeleteStmt(OUT_TYPE(DeleteStmt, DeleteStmt) out, const DeleteStmt *node) { - WRITE_LIST_FIELD(opfamilyname, opfamilyname, opfamilyname); - WRITE_STRING_FIELD(amname, amname, amname); + WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); + WRITE_LIST_FIELD(using_clause, usingClause, usingClause); + WRITE_NODE_PTR_FIELD(where_clause, whereClause, whereClause); + WRITE_LIST_FIELD(returning_list, returningList, returningList); + WRITE_SPECIFIC_NODE_PTR_FIELD(WithClause, with_clause, with_clause, withClause, withClause); } static void -_outAlterOpFamilyStmt(OUT_TYPE(AlterOpFamilyStmt, AlterOpFamilyStmt) out, const AlterOpFamilyStmt *node) +_outUpdateStmt(OUT_TYPE(UpdateStmt, UpdateStmt) out, const UpdateStmt *node) { - WRITE_LIST_FIELD(opfamilyname, opfamilyname, opfamilyname); - WRITE_STRING_FIELD(amname, amname, amname); - WRITE_BOOL_FIELD(is_drop, isDrop, isDrop); - WRITE_LIST_FIELD(items, items, items); + WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); + WRITE_LIST_FIELD(target_list, targetList, targetList); + WRITE_NODE_PTR_FIELD(where_clause, whereClause, whereClause); + WRITE_LIST_FIELD(from_clause, fromClause, fromClause); + WRITE_LIST_FIELD(returning_list, returningList, returningList); + WRITE_SPECIFIC_NODE_PTR_FIELD(WithClause, with_clause, with_clause, withClause, withClause); } static void -_outPrepareStmt(OUT_TYPE(PrepareStmt, PrepareStmt) out, const PrepareStmt *node) +_outMergeStmt(OUT_TYPE(MergeStmt, MergeStmt) out, const MergeStmt *node) { - WRITE_STRING_FIELD(name, name, name); - WRITE_LIST_FIELD(argtypes, argtypes, argtypes); - WRITE_NODE_PTR_FIELD(query, query, query); + WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); + WRITE_NODE_PTR_FIELD(source_relation, sourceRelation, sourceRelation); + WRITE_NODE_PTR_FIELD(join_condition, joinCondition, joinCondition); + WRITE_LIST_FIELD(merge_when_clauses, mergeWhenClauses, mergeWhenClauses); + WRITE_SPECIFIC_NODE_PTR_FIELD(WithClause, with_clause, with_clause, withClause, withClause); } static void -_outExecuteStmt(OUT_TYPE(ExecuteStmt, ExecuteStmt) out, const ExecuteStmt *node) +_outSelectStmt(OUT_TYPE(SelectStmt, SelectStmt) out, const SelectStmt *node) { - WRITE_STRING_FIELD(name, name, name); - WRITE_LIST_FIELD(params, params, params); + WRITE_LIST_FIELD(distinct_clause, distinctClause, distinctClause); + WRITE_SPECIFIC_NODE_PTR_FIELD(IntoClause, into_clause, into_clause, intoClause, intoClause); + WRITE_LIST_FIELD(target_list, targetList, targetList); + WRITE_LIST_FIELD(from_clause, fromClause, fromClause); + WRITE_NODE_PTR_FIELD(where_clause, whereClause, whereClause); + WRITE_LIST_FIELD(group_clause, groupClause, groupClause); + WRITE_BOOL_FIELD(group_distinct, groupDistinct, groupDistinct); + WRITE_NODE_PTR_FIELD(having_clause, havingClause, havingClause); + WRITE_LIST_FIELD(window_clause, windowClause, windowClause); + WRITE_LIST_FIELD(values_lists, valuesLists, valuesLists); + WRITE_LIST_FIELD(sort_clause, sortClause, sortClause); + WRITE_NODE_PTR_FIELD(limit_offset, limitOffset, limitOffset); + WRITE_NODE_PTR_FIELD(limit_count, limitCount, limitCount); + WRITE_ENUM_FIELD(LimitOption, limit_option, limitOption, limitOption); + WRITE_LIST_FIELD(locking_clause, lockingClause, lockingClause); + WRITE_SPECIFIC_NODE_PTR_FIELD(WithClause, with_clause, with_clause, withClause, withClause); + WRITE_ENUM_FIELD(SetOperation, op, op, op); + WRITE_BOOL_FIELD(all, all, all); + WRITE_SPECIFIC_NODE_PTR_FIELD(SelectStmt, select_stmt, larg, larg, larg); + WRITE_SPECIFIC_NODE_PTR_FIELD(SelectStmt, select_stmt, rarg, rarg, rarg); } static void -_outDeallocateStmt(OUT_TYPE(DeallocateStmt, DeallocateStmt) out, const DeallocateStmt *node) +_outSetOperationStmt(OUT_TYPE(SetOperationStmt, SetOperationStmt) out, const SetOperationStmt *node) { - WRITE_STRING_FIELD(name, name, name); + WRITE_ENUM_FIELD(SetOperation, op, op, op); + WRITE_BOOL_FIELD(all, all, all); + WRITE_NODE_PTR_FIELD(larg, larg, larg); + WRITE_NODE_PTR_FIELD(rarg, rarg, rarg); + WRITE_LIST_FIELD(col_types, colTypes, colTypes); + WRITE_LIST_FIELD(col_typmods, colTypmods, colTypmods); + WRITE_LIST_FIELD(col_collations, colCollations, colCollations); + WRITE_LIST_FIELD(group_clauses, groupClauses, groupClauses); } static void -_outDeclareCursorStmt(OUT_TYPE(DeclareCursorStmt, DeclareCursorStmt) out, const DeclareCursorStmt *node) +_outReturnStmt(OUT_TYPE(ReturnStmt, ReturnStmt) out, const ReturnStmt *node) { - WRITE_STRING_FIELD(portalname, portalname, portalname); - WRITE_INT_FIELD(options, options, options); - WRITE_NODE_PTR_FIELD(query, query, query); + WRITE_NODE_PTR_FIELD(returnval, returnval, returnval); } static void -_outCreateTableSpaceStmt(OUT_TYPE(CreateTableSpaceStmt, CreateTableSpaceStmt) out, const CreateTableSpaceStmt *node) +_outPLAssignStmt(OUT_TYPE(PLAssignStmt, PLAssignStmt) out, const PLAssignStmt *node) { - WRITE_STRING_FIELD(tablespacename, tablespacename, tablespacename); - WRITE_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, owner, owner, owner); - WRITE_STRING_FIELD(location, location, location); - WRITE_LIST_FIELD(options, options, options); + WRITE_STRING_FIELD(name, name, name); + WRITE_LIST_FIELD(indirection, indirection, indirection); + WRITE_INT_FIELD(nnames, nnames, nnames); + WRITE_SPECIFIC_NODE_PTR_FIELD(SelectStmt, select_stmt, val, val, val); + WRITE_INT_FIELD(location, location, location); } static void -_outDropTableSpaceStmt(OUT_TYPE(DropTableSpaceStmt, DropTableSpaceStmt) out, const DropTableSpaceStmt *node) +_outCreateSchemaStmt(OUT_TYPE(CreateSchemaStmt, CreateSchemaStmt) out, const CreateSchemaStmt *node) { - WRITE_STRING_FIELD(tablespacename, tablespacename, tablespacename); - WRITE_BOOL_FIELD(missing_ok, missing_ok, missing_ok); + WRITE_STRING_FIELD(schemaname, schemaname, schemaname); + WRITE_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, authrole, authrole, authrole); + WRITE_LIST_FIELD(schema_elts, schemaElts, schemaElts); + WRITE_BOOL_FIELD(if_not_exists, if_not_exists, if_not_exists); } static void -_outAlterObjectDependsStmt(OUT_TYPE(AlterObjectDependsStmt, AlterObjectDependsStmt) out, const AlterObjectDependsStmt *node) +_outAlterTableStmt(OUT_TYPE(AlterTableStmt, AlterTableStmt) out, const AlterTableStmt *node) { - WRITE_ENUM_FIELD(ObjectType, object_type, objectType, objectType); WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); - WRITE_NODE_PTR_FIELD(object, object, object); - WRITE_SPECIFIC_NODE_PTR_FIELD(String, string, extname, extname, extname); - WRITE_BOOL_FIELD(remove, remove, remove); + WRITE_LIST_FIELD(cmds, cmds, cmds); + WRITE_ENUM_FIELD(ObjectType, objtype, objtype, objtype); + WRITE_BOOL_FIELD(missing_ok, missing_ok, missing_ok); } static void -_outAlterObjectSchemaStmt(OUT_TYPE(AlterObjectSchemaStmt, AlterObjectSchemaStmt) out, const AlterObjectSchemaStmt *node) +_outReplicaIdentityStmt(OUT_TYPE(ReplicaIdentityStmt, ReplicaIdentityStmt) out, const ReplicaIdentityStmt *node) { - WRITE_ENUM_FIELD(ObjectType, object_type, objectType, objectType); - WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); - WRITE_NODE_PTR_FIELD(object, object, object); - WRITE_STRING_FIELD(newschema, newschema, newschema); - WRITE_BOOL_FIELD(missing_ok, missing_ok, missing_ok); + WRITE_CHAR_FIELD(identity_type, identity_type, identity_type); + WRITE_STRING_FIELD(name, name, name); } static void -_outAlterOwnerStmt(OUT_TYPE(AlterOwnerStmt, AlterOwnerStmt) out, const AlterOwnerStmt *node) +_outAlterTableCmd(OUT_TYPE(AlterTableCmd, AlterTableCmd) out, const AlterTableCmd *node) { - WRITE_ENUM_FIELD(ObjectType, object_type, objectType, objectType); - WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); - WRITE_NODE_PTR_FIELD(object, object, object); + WRITE_ENUM_FIELD(AlterTableType, subtype, subtype, subtype); + WRITE_STRING_FIELD(name, name, name); + WRITE_INT_FIELD(num, num, num); WRITE_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, newowner, newowner, newowner); + WRITE_NODE_PTR_FIELD(def, def, def); + WRITE_ENUM_FIELD(DropBehavior, behavior, behavior, behavior); + WRITE_BOOL_FIELD(missing_ok, missing_ok, missing_ok); + WRITE_BOOL_FIELD(recurse, recurse, recurse); } static void -_outAlterOperatorStmt(OUT_TYPE(AlterOperatorStmt, AlterOperatorStmt) out, const AlterOperatorStmt *node) +_outAlterCollationStmt(OUT_TYPE(AlterCollationStmt, AlterCollationStmt) out, const AlterCollationStmt *node) { - WRITE_SPECIFIC_NODE_PTR_FIELD(ObjectWithArgs, object_with_args, opername, opername, opername); - WRITE_LIST_FIELD(options, options, options); + WRITE_LIST_FIELD(collname, collname, collname); } static void -_outAlterTypeStmt(OUT_TYPE(AlterTypeStmt, AlterTypeStmt) out, const AlterTypeStmt *node) +_outAlterDomainStmt(OUT_TYPE(AlterDomainStmt, AlterDomainStmt) out, const AlterDomainStmt *node) { + WRITE_CHAR_FIELD(subtype, subtype, subtype); WRITE_LIST_FIELD(type_name, typeName, typeName); - WRITE_LIST_FIELD(options, options, options); + WRITE_STRING_FIELD(name, name, name); + WRITE_NODE_PTR_FIELD(def, def, def); + WRITE_ENUM_FIELD(DropBehavior, behavior, behavior, behavior); + WRITE_BOOL_FIELD(missing_ok, missing_ok, missing_ok); } static void -_outDropOwnedStmt(OUT_TYPE(DropOwnedStmt, DropOwnedStmt) out, const DropOwnedStmt *node) +_outGrantStmt(OUT_TYPE(GrantStmt, GrantStmt) out, const GrantStmt *node) { - WRITE_LIST_FIELD(roles, roles, roles); + WRITE_BOOL_FIELD(is_grant, is_grant, is_grant); + WRITE_ENUM_FIELD(GrantTargetType, targtype, targtype, targtype); + WRITE_ENUM_FIELD(ObjectType, objtype, objtype, objtype); + WRITE_LIST_FIELD(objects, objects, objects); + WRITE_LIST_FIELD(privileges, privileges, privileges); + WRITE_LIST_FIELD(grantees, grantees, grantees); + WRITE_BOOL_FIELD(grant_option, grant_option, grant_option); + WRITE_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, grantor, grantor, grantor); WRITE_ENUM_FIELD(DropBehavior, behavior, behavior, behavior); } static void -_outReassignOwnedStmt(OUT_TYPE(ReassignOwnedStmt, ReassignOwnedStmt) out, const ReassignOwnedStmt *node) +_outObjectWithArgs(OUT_TYPE(ObjectWithArgs, ObjectWithArgs) out, const ObjectWithArgs *node) { - WRITE_LIST_FIELD(roles, roles, roles); - WRITE_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, newrole, newrole, newrole); + WRITE_LIST_FIELD(objname, objname, objname); + WRITE_LIST_FIELD(objargs, objargs, objargs); + WRITE_LIST_FIELD(objfuncargs, objfuncargs, objfuncargs); + WRITE_BOOL_FIELD(args_unspecified, args_unspecified, args_unspecified); } static void -_outCompositeTypeStmt(OUT_TYPE(CompositeTypeStmt, CompositeTypeStmt) out, const CompositeTypeStmt *node) +_outAccessPriv(OUT_TYPE(AccessPriv, AccessPriv) out, const AccessPriv *node) { - WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, typevar, typevar, typevar); - WRITE_LIST_FIELD(coldeflist, coldeflist, coldeflist); + WRITE_STRING_FIELD(priv_name, priv_name, priv_name); + WRITE_LIST_FIELD(cols, cols, cols); } static void -_outCreateEnumStmt(OUT_TYPE(CreateEnumStmt, CreateEnumStmt) out, const CreateEnumStmt *node) +_outGrantRoleStmt(OUT_TYPE(GrantRoleStmt, GrantRoleStmt) out, const GrantRoleStmt *node) { - WRITE_LIST_FIELD(type_name, typeName, typeName); - WRITE_LIST_FIELD(vals, vals, vals); + WRITE_LIST_FIELD(granted_roles, granted_roles, granted_roles); + WRITE_LIST_FIELD(grantee_roles, grantee_roles, grantee_roles); + WRITE_BOOL_FIELD(is_grant, is_grant, is_grant); + WRITE_LIST_FIELD(opt, opt, opt); + WRITE_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, grantor, grantor, grantor); + WRITE_ENUM_FIELD(DropBehavior, behavior, behavior, behavior); } static void -_outCreateRangeStmt(OUT_TYPE(CreateRangeStmt, CreateRangeStmt) out, const CreateRangeStmt *node) +_outAlterDefaultPrivilegesStmt(OUT_TYPE(AlterDefaultPrivilegesStmt, AlterDefaultPrivilegesStmt) out, const AlterDefaultPrivilegesStmt *node) { - WRITE_LIST_FIELD(type_name, typeName, typeName); - WRITE_LIST_FIELD(params, params, params); + WRITE_LIST_FIELD(options, options, options); + WRITE_SPECIFIC_NODE_PTR_FIELD(GrantStmt, grant_stmt, action, action, action); } static void -_outAlterEnumStmt(OUT_TYPE(AlterEnumStmt, AlterEnumStmt) out, const AlterEnumStmt *node) +_outCopyStmt(OUT_TYPE(CopyStmt, CopyStmt) out, const CopyStmt *node) { - WRITE_LIST_FIELD(type_name, typeName, typeName); - WRITE_STRING_FIELD(old_val, oldVal, oldVal); - WRITE_STRING_FIELD(new_val, newVal, newVal); - WRITE_STRING_FIELD(new_val_neighbor, newValNeighbor, newValNeighbor); - WRITE_BOOL_FIELD(new_val_is_after, newValIsAfter, newValIsAfter); - WRITE_BOOL_FIELD(skip_if_new_val_exists, skipIfNewValExists, skipIfNewValExists); + WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); + WRITE_NODE_PTR_FIELD(query, query, query); + WRITE_LIST_FIELD(attlist, attlist, attlist); + WRITE_BOOL_FIELD(is_from, is_from, is_from); + WRITE_BOOL_FIELD(is_program, is_program, is_program); + WRITE_STRING_FIELD(filename, filename, filename); + WRITE_LIST_FIELD(options, options, options); + WRITE_NODE_PTR_FIELD(where_clause, whereClause, whereClause); } static void -_outAlterTSDictionaryStmt(OUT_TYPE(AlterTSDictionaryStmt, AlterTSDictionaryStmt) out, const AlterTSDictionaryStmt *node) +_outVariableSetStmt(OUT_TYPE(VariableSetStmt, VariableSetStmt) out, const VariableSetStmt *node) { - WRITE_LIST_FIELD(dictname, dictname, dictname); - WRITE_LIST_FIELD(options, options, options); + WRITE_ENUM_FIELD(VariableSetKind, kind, kind, kind); + WRITE_STRING_FIELD(name, name, name); + WRITE_LIST_FIELD(args, args, args); + WRITE_BOOL_FIELD(is_local, is_local, is_local); } static void -_outAlterTSConfigurationStmt(OUT_TYPE(AlterTSConfigurationStmt, AlterTSConfigurationStmt) out, const AlterTSConfigurationStmt *node) +_outVariableShowStmt(OUT_TYPE(VariableShowStmt, VariableShowStmt) out, const VariableShowStmt *node) { - WRITE_ENUM_FIELD(AlterTSConfigType, kind, kind, kind); - WRITE_LIST_FIELD(cfgname, cfgname, cfgname); - WRITE_LIST_FIELD(tokentype, tokentype, tokentype); - WRITE_LIST_FIELD(dicts, dicts, dicts); - WRITE_BOOL_FIELD(override, override, override); - WRITE_BOOL_FIELD(replace, replace, replace); - WRITE_BOOL_FIELD(missing_ok, missing_ok, missing_ok); + WRITE_STRING_FIELD(name, name, name); } static void -_outCreateFdwStmt(OUT_TYPE(CreateFdwStmt, CreateFdwStmt) out, const CreateFdwStmt *node) -{ - WRITE_STRING_FIELD(fdwname, fdwname, fdwname); - WRITE_LIST_FIELD(func_options, func_options, func_options); - WRITE_LIST_FIELD(options, options, options); -} - -static void -_outAlterFdwStmt(OUT_TYPE(AlterFdwStmt, AlterFdwStmt) out, const AlterFdwStmt *node) +_outCreateStmt(OUT_TYPE(CreateStmt, CreateStmt) out, const CreateStmt *node) { - WRITE_STRING_FIELD(fdwname, fdwname, fdwname); - WRITE_LIST_FIELD(func_options, func_options, func_options); + WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); + WRITE_LIST_FIELD(table_elts, tableElts, tableElts); + WRITE_LIST_FIELD(inh_relations, inhRelations, inhRelations); + WRITE_SPECIFIC_NODE_PTR_FIELD(PartitionBoundSpec, partition_bound_spec, partbound, partbound, partbound); + WRITE_SPECIFIC_NODE_PTR_FIELD(PartitionSpec, partition_spec, partspec, partspec, partspec); + WRITE_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, of_typename, ofTypename, ofTypename); + WRITE_LIST_FIELD(constraints, constraints, constraints); WRITE_LIST_FIELD(options, options, options); -} - -static void -_outCreateForeignServerStmt(OUT_TYPE(CreateForeignServerStmt, CreateForeignServerStmt) out, const CreateForeignServerStmt *node) -{ - WRITE_STRING_FIELD(servername, servername, servername); - WRITE_STRING_FIELD(servertype, servertype, servertype); - WRITE_STRING_FIELD(version, version, version); - WRITE_STRING_FIELD(fdwname, fdwname, fdwname); + WRITE_ENUM_FIELD(OnCommitAction, oncommit, oncommit, oncommit); + WRITE_STRING_FIELD(tablespacename, tablespacename, tablespacename); + WRITE_STRING_FIELD(access_method, accessMethod, accessMethod); WRITE_BOOL_FIELD(if_not_exists, if_not_exists, if_not_exists); - WRITE_LIST_FIELD(options, options, options); -} - -static void -_outAlterForeignServerStmt(OUT_TYPE(AlterForeignServerStmt, AlterForeignServerStmt) out, const AlterForeignServerStmt *node) -{ - WRITE_STRING_FIELD(servername, servername, servername); - WRITE_STRING_FIELD(version, version, version); - WRITE_LIST_FIELD(options, options, options); - WRITE_BOOL_FIELD(has_version, has_version, has_version); } static void -_outCreateUserMappingStmt(OUT_TYPE(CreateUserMappingStmt, CreateUserMappingStmt) out, const CreateUserMappingStmt *node) +_outConstraint(OUT_TYPE(Constraint, Constraint) out, const Constraint *node) { - WRITE_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, user, user, user); - WRITE_STRING_FIELD(servername, servername, servername); - WRITE_BOOL_FIELD(if_not_exists, if_not_exists, if_not_exists); + WRITE_ENUM_FIELD(ConstrType, contype, contype, contype); + WRITE_STRING_FIELD(conname, conname, conname); + WRITE_BOOL_FIELD(deferrable, deferrable, deferrable); + WRITE_BOOL_FIELD(initdeferred, initdeferred, initdeferred); + WRITE_INT_FIELD(location, location, location); + WRITE_BOOL_FIELD(is_no_inherit, is_no_inherit, is_no_inherit); + WRITE_NODE_PTR_FIELD(raw_expr, raw_expr, raw_expr); + WRITE_STRING_FIELD(cooked_expr, cooked_expr, cooked_expr); + WRITE_CHAR_FIELD(generated_when, generated_when, generated_when); + WRITE_BOOL_FIELD(nulls_not_distinct, nulls_not_distinct, nulls_not_distinct); + WRITE_LIST_FIELD(keys, keys, keys); + WRITE_LIST_FIELD(including, including, including); + WRITE_LIST_FIELD(exclusions, exclusions, exclusions); WRITE_LIST_FIELD(options, options, options); + WRITE_STRING_FIELD(indexname, indexname, indexname); + WRITE_STRING_FIELD(indexspace, indexspace, indexspace); + WRITE_BOOL_FIELD(reset_default_tblspc, reset_default_tblspc, reset_default_tblspc); + WRITE_STRING_FIELD(access_method, access_method, access_method); + WRITE_NODE_PTR_FIELD(where_clause, where_clause, where_clause); + WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, pktable, pktable, pktable); + WRITE_LIST_FIELD(fk_attrs, fk_attrs, fk_attrs); + WRITE_LIST_FIELD(pk_attrs, pk_attrs, pk_attrs); + WRITE_CHAR_FIELD(fk_matchtype, fk_matchtype, fk_matchtype); + WRITE_CHAR_FIELD(fk_upd_action, fk_upd_action, fk_upd_action); + WRITE_CHAR_FIELD(fk_del_action, fk_del_action, fk_del_action); + WRITE_LIST_FIELD(fk_del_set_cols, fk_del_set_cols, fk_del_set_cols); + WRITE_LIST_FIELD(old_conpfeqop, old_conpfeqop, old_conpfeqop); + WRITE_UINT_FIELD(old_pktable_oid, old_pktable_oid, old_pktable_oid); + WRITE_BOOL_FIELD(skip_validation, skip_validation, skip_validation); + WRITE_BOOL_FIELD(initially_valid, initially_valid, initially_valid); } static void -_outAlterUserMappingStmt(OUT_TYPE(AlterUserMappingStmt, AlterUserMappingStmt) out, const AlterUserMappingStmt *node) +_outCreateTableSpaceStmt(OUT_TYPE(CreateTableSpaceStmt, CreateTableSpaceStmt) out, const CreateTableSpaceStmt *node) { - WRITE_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, user, user, user); - WRITE_STRING_FIELD(servername, servername, servername); + WRITE_STRING_FIELD(tablespacename, tablespacename, tablespacename); + WRITE_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, owner, owner, owner); + WRITE_STRING_FIELD(location, location, location); WRITE_LIST_FIELD(options, options, options); } static void -_outDropUserMappingStmt(OUT_TYPE(DropUserMappingStmt, DropUserMappingStmt) out, const DropUserMappingStmt *node) +_outDropTableSpaceStmt(OUT_TYPE(DropTableSpaceStmt, DropTableSpaceStmt) out, const DropTableSpaceStmt *node) { - WRITE_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, user, user, user); - WRITE_STRING_FIELD(servername, servername, servername); + WRITE_STRING_FIELD(tablespacename, tablespacename, tablespacename); WRITE_BOOL_FIELD(missing_ok, missing_ok, missing_ok); } @@ -1714,92 +1816,107 @@ _outAlterTableMoveAllStmt(OUT_TYPE(AlterTableMoveAllStmt, AlterTableMoveAllStmt) } static void -_outSecLabelStmt(OUT_TYPE(SecLabelStmt, SecLabelStmt) out, const SecLabelStmt *node) +_outCreateExtensionStmt(OUT_TYPE(CreateExtensionStmt, CreateExtensionStmt) out, const CreateExtensionStmt *node) { - WRITE_ENUM_FIELD(ObjectType, objtype, objtype, objtype); - WRITE_NODE_PTR_FIELD(object, object, object); - WRITE_STRING_FIELD(provider, provider, provider); - WRITE_STRING_FIELD(label, label, label); + WRITE_STRING_FIELD(extname, extname, extname); + WRITE_BOOL_FIELD(if_not_exists, if_not_exists, if_not_exists); + WRITE_LIST_FIELD(options, options, options); } static void -_outCreateForeignTableStmt(OUT_TYPE(CreateForeignTableStmt, CreateForeignTableStmt) out, const CreateForeignTableStmt *node) +_outAlterExtensionStmt(OUT_TYPE(AlterExtensionStmt, AlterExtensionStmt) out, const AlterExtensionStmt *node) { - WRITE_SPECIFIC_NODE_FIELD(CreateStmt, create_stmt, base_stmt, base, base); - WRITE_STRING_FIELD(servername, servername, servername); + WRITE_STRING_FIELD(extname, extname, extname); WRITE_LIST_FIELD(options, options, options); } static void -_outImportForeignSchemaStmt(OUT_TYPE(ImportForeignSchemaStmt, ImportForeignSchemaStmt) out, const ImportForeignSchemaStmt *node) +_outAlterExtensionContentsStmt(OUT_TYPE(AlterExtensionContentsStmt, AlterExtensionContentsStmt) out, const AlterExtensionContentsStmt *node) { - WRITE_STRING_FIELD(server_name, server_name, server_name); - WRITE_STRING_FIELD(remote_schema, remote_schema, remote_schema); - WRITE_STRING_FIELD(local_schema, local_schema, local_schema); - WRITE_ENUM_FIELD(ImportForeignSchemaType, list_type, list_type, list_type); - WRITE_LIST_FIELD(table_list, table_list, table_list); + WRITE_STRING_FIELD(extname, extname, extname); + WRITE_INT_FIELD(action, action, action); + WRITE_ENUM_FIELD(ObjectType, objtype, objtype, objtype); + WRITE_NODE_PTR_FIELD(object, object, object); +} + +static void +_outCreateFdwStmt(OUT_TYPE(CreateFdwStmt, CreateFdwStmt) out, const CreateFdwStmt *node) +{ + WRITE_STRING_FIELD(fdwname, fdwname, fdwname); + WRITE_LIST_FIELD(func_options, func_options, func_options); WRITE_LIST_FIELD(options, options, options); } static void -_outCreateExtensionStmt(OUT_TYPE(CreateExtensionStmt, CreateExtensionStmt) out, const CreateExtensionStmt *node) +_outAlterFdwStmt(OUT_TYPE(AlterFdwStmt, AlterFdwStmt) out, const AlterFdwStmt *node) { - WRITE_STRING_FIELD(extname, extname, extname); - WRITE_BOOL_FIELD(if_not_exists, if_not_exists, if_not_exists); + WRITE_STRING_FIELD(fdwname, fdwname, fdwname); + WRITE_LIST_FIELD(func_options, func_options, func_options); WRITE_LIST_FIELD(options, options, options); } static void -_outAlterExtensionStmt(OUT_TYPE(AlterExtensionStmt, AlterExtensionStmt) out, const AlterExtensionStmt *node) +_outCreateForeignServerStmt(OUT_TYPE(CreateForeignServerStmt, CreateForeignServerStmt) out, const CreateForeignServerStmt *node) { - WRITE_STRING_FIELD(extname, extname, extname); + WRITE_STRING_FIELD(servername, servername, servername); + WRITE_STRING_FIELD(servertype, servertype, servertype); + WRITE_STRING_FIELD(version, version, version); + WRITE_STRING_FIELD(fdwname, fdwname, fdwname); + WRITE_BOOL_FIELD(if_not_exists, if_not_exists, if_not_exists); WRITE_LIST_FIELD(options, options, options); } static void -_outAlterExtensionContentsStmt(OUT_TYPE(AlterExtensionContentsStmt, AlterExtensionContentsStmt) out, const AlterExtensionContentsStmt *node) +_outAlterForeignServerStmt(OUT_TYPE(AlterForeignServerStmt, AlterForeignServerStmt) out, const AlterForeignServerStmt *node) { - WRITE_STRING_FIELD(extname, extname, extname); - WRITE_INT_FIELD(action, action, action); - WRITE_ENUM_FIELD(ObjectType, objtype, objtype, objtype); - WRITE_NODE_PTR_FIELD(object, object, object); + WRITE_STRING_FIELD(servername, servername, servername); + WRITE_STRING_FIELD(version, version, version); + WRITE_LIST_FIELD(options, options, options); + WRITE_BOOL_FIELD(has_version, has_version, has_version); } static void -_outCreateEventTrigStmt(OUT_TYPE(CreateEventTrigStmt, CreateEventTrigStmt) out, const CreateEventTrigStmt *node) +_outCreateForeignTableStmt(OUT_TYPE(CreateForeignTableStmt, CreateForeignTableStmt) out, const CreateForeignTableStmt *node) { - WRITE_STRING_FIELD(trigname, trigname, trigname); - WRITE_STRING_FIELD(eventname, eventname, eventname); - WRITE_LIST_FIELD(whenclause, whenclause, whenclause); - WRITE_LIST_FIELD(funcname, funcname, funcname); + WRITE_SPECIFIC_NODE_FIELD(CreateStmt, create_stmt, base_stmt, base, base); + WRITE_STRING_FIELD(servername, servername, servername); + WRITE_LIST_FIELD(options, options, options); } static void -_outAlterEventTrigStmt(OUT_TYPE(AlterEventTrigStmt, AlterEventTrigStmt) out, const AlterEventTrigStmt *node) +_outCreateUserMappingStmt(OUT_TYPE(CreateUserMappingStmt, CreateUserMappingStmt) out, const CreateUserMappingStmt *node) { - WRITE_STRING_FIELD(trigname, trigname, trigname); - WRITE_CHAR_FIELD(tgenabled, tgenabled, tgenabled); + WRITE_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, user, user, user); + WRITE_STRING_FIELD(servername, servername, servername); + WRITE_BOOL_FIELD(if_not_exists, if_not_exists, if_not_exists); + WRITE_LIST_FIELD(options, options, options); } static void -_outRefreshMatViewStmt(OUT_TYPE(RefreshMatViewStmt, RefreshMatViewStmt) out, const RefreshMatViewStmt *node) +_outAlterUserMappingStmt(OUT_TYPE(AlterUserMappingStmt, AlterUserMappingStmt) out, const AlterUserMappingStmt *node) { - WRITE_BOOL_FIELD(concurrent, concurrent, concurrent); - WRITE_BOOL_FIELD(skip_data, skipData, skipData); - WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); + WRITE_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, user, user, user); + WRITE_STRING_FIELD(servername, servername, servername); + WRITE_LIST_FIELD(options, options, options); } static void -_outReplicaIdentityStmt(OUT_TYPE(ReplicaIdentityStmt, ReplicaIdentityStmt) out, const ReplicaIdentityStmt *node) +_outDropUserMappingStmt(OUT_TYPE(DropUserMappingStmt, DropUserMappingStmt) out, const DropUserMappingStmt *node) { - WRITE_CHAR_FIELD(identity_type, identity_type, identity_type); - WRITE_STRING_FIELD(name, name, name); + WRITE_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, user, user, user); + WRITE_STRING_FIELD(servername, servername, servername); + WRITE_BOOL_FIELD(missing_ok, missing_ok, missing_ok); } static void -_outAlterSystemStmt(OUT_TYPE(AlterSystemStmt, AlterSystemStmt) out, const AlterSystemStmt *node) +_outImportForeignSchemaStmt(OUT_TYPE(ImportForeignSchemaStmt, ImportForeignSchemaStmt) out, const ImportForeignSchemaStmt *node) { - WRITE_SPECIFIC_NODE_PTR_FIELD(VariableSetStmt, variable_set_stmt, setstmt, setstmt, setstmt); + WRITE_STRING_FIELD(server_name, server_name, server_name); + WRITE_STRING_FIELD(remote_schema, remote_schema, remote_schema); + WRITE_STRING_FIELD(local_schema, local_schema, local_schema); + WRITE_ENUM_FIELD(ImportForeignSchemaType, list_type, list_type, list_type); + WRITE_LIST_FIELD(table_list, table_list, table_list); + WRITE_LIST_FIELD(options, options, options); } static void @@ -1824,16 +1941,6 @@ _outAlterPolicyStmt(OUT_TYPE(AlterPolicyStmt, AlterPolicyStmt) out, const AlterP WRITE_NODE_PTR_FIELD(with_check, with_check, with_check); } -static void -_outCreateTransformStmt(OUT_TYPE(CreateTransformStmt, CreateTransformStmt) out, const CreateTransformStmt *node) -{ - WRITE_BOOL_FIELD(replace, replace, replace); - WRITE_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, type_name, type_name, type_name); - WRITE_STRING_FIELD(lang, lang, lang); - WRITE_SPECIFIC_NODE_PTR_FIELD(ObjectWithArgs, object_with_args, fromsql, fromsql, fromsql); - WRITE_SPECIFIC_NODE_PTR_FIELD(ObjectWithArgs, object_with_args, tosql, tosql, tosql); -} - static void _outCreateAmStmt(OUT_TYPE(CreateAmStmt, CreateAmStmt) out, const CreateAmStmt *node) { @@ -1843,691 +1950,694 @@ _outCreateAmStmt(OUT_TYPE(CreateAmStmt, CreateAmStmt) out, const CreateAmStmt *n } static void -_outCreatePublicationStmt(OUT_TYPE(CreatePublicationStmt, CreatePublicationStmt) out, const CreatePublicationStmt *node) +_outCreateTrigStmt(OUT_TYPE(CreateTrigStmt, CreateTrigStmt) out, const CreateTrigStmt *node) { - WRITE_STRING_FIELD(pubname, pubname, pubname); - WRITE_LIST_FIELD(options, options, options); - WRITE_LIST_FIELD(pubobjects, pubobjects, pubobjects); - WRITE_BOOL_FIELD(for_all_tables, for_all_tables, for_all_tables); + WRITE_BOOL_FIELD(replace, replace, replace); + WRITE_BOOL_FIELD(isconstraint, isconstraint, isconstraint); + WRITE_STRING_FIELD(trigname, trigname, trigname); + WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); + WRITE_LIST_FIELD(funcname, funcname, funcname); + WRITE_LIST_FIELD(args, args, args); + WRITE_BOOL_FIELD(row, row, row); + WRITE_INT_FIELD(timing, timing, timing); + WRITE_INT_FIELD(events, events, events); + WRITE_LIST_FIELD(columns, columns, columns); + WRITE_NODE_PTR_FIELD(when_clause, whenClause, whenClause); + WRITE_LIST_FIELD(transition_rels, transitionRels, transitionRels); + WRITE_BOOL_FIELD(deferrable, deferrable, deferrable); + WRITE_BOOL_FIELD(initdeferred, initdeferred, initdeferred); + WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, constrrel, constrrel, constrrel); } static void -_outAlterPublicationStmt(OUT_TYPE(AlterPublicationStmt, AlterPublicationStmt) out, const AlterPublicationStmt *node) +_outCreateEventTrigStmt(OUT_TYPE(CreateEventTrigStmt, CreateEventTrigStmt) out, const CreateEventTrigStmt *node) { - WRITE_STRING_FIELD(pubname, pubname, pubname); - WRITE_LIST_FIELD(options, options, options); - WRITE_LIST_FIELD(pubobjects, pubobjects, pubobjects); - WRITE_BOOL_FIELD(for_all_tables, for_all_tables, for_all_tables); - WRITE_ENUM_FIELD(AlterPublicationAction, action, action, action); + WRITE_STRING_FIELD(trigname, trigname, trigname); + WRITE_STRING_FIELD(eventname, eventname, eventname); + WRITE_LIST_FIELD(whenclause, whenclause, whenclause); + WRITE_LIST_FIELD(funcname, funcname, funcname); } static void -_outCreateSubscriptionStmt(OUT_TYPE(CreateSubscriptionStmt, CreateSubscriptionStmt) out, const CreateSubscriptionStmt *node) +_outAlterEventTrigStmt(OUT_TYPE(AlterEventTrigStmt, AlterEventTrigStmt) out, const AlterEventTrigStmt *node) { - WRITE_STRING_FIELD(subname, subname, subname); - WRITE_STRING_FIELD(conninfo, conninfo, conninfo); - WRITE_LIST_FIELD(publication, publication, publication); - WRITE_LIST_FIELD(options, options, options); + WRITE_STRING_FIELD(trigname, trigname, trigname); + WRITE_CHAR_FIELD(tgenabled, tgenabled, tgenabled); } static void -_outAlterSubscriptionStmt(OUT_TYPE(AlterSubscriptionStmt, AlterSubscriptionStmt) out, const AlterSubscriptionStmt *node) +_outCreatePLangStmt(OUT_TYPE(CreatePLangStmt, CreatePLangStmt) out, const CreatePLangStmt *node) { - WRITE_ENUM_FIELD(AlterSubscriptionType, kind, kind, kind); - WRITE_STRING_FIELD(subname, subname, subname); - WRITE_STRING_FIELD(conninfo, conninfo, conninfo); - WRITE_LIST_FIELD(publication, publication, publication); - WRITE_LIST_FIELD(options, options, options); + WRITE_BOOL_FIELD(replace, replace, replace); + WRITE_STRING_FIELD(plname, plname, plname); + WRITE_LIST_FIELD(plhandler, plhandler, plhandler); + WRITE_LIST_FIELD(plinline, plinline, plinline); + WRITE_LIST_FIELD(plvalidator, plvalidator, plvalidator); + WRITE_BOOL_FIELD(pltrusted, pltrusted, pltrusted); } static void -_outDropSubscriptionStmt(OUT_TYPE(DropSubscriptionStmt, DropSubscriptionStmt) out, const DropSubscriptionStmt *node) +_outCreateRoleStmt(OUT_TYPE(CreateRoleStmt, CreateRoleStmt) out, const CreateRoleStmt *node) { - WRITE_STRING_FIELD(subname, subname, subname); - WRITE_BOOL_FIELD(missing_ok, missing_ok, missing_ok); - WRITE_ENUM_FIELD(DropBehavior, behavior, behavior, behavior); + WRITE_ENUM_FIELD(RoleStmtType, stmt_type, stmt_type, stmt_type); + WRITE_STRING_FIELD(role, role, role); + WRITE_LIST_FIELD(options, options, options); } static void -_outCreateStatsStmt(OUT_TYPE(CreateStatsStmt, CreateStatsStmt) out, const CreateStatsStmt *node) +_outAlterRoleStmt(OUT_TYPE(AlterRoleStmt, AlterRoleStmt) out, const AlterRoleStmt *node) { - WRITE_LIST_FIELD(defnames, defnames, defnames); - WRITE_LIST_FIELD(stat_types, stat_types, stat_types); - WRITE_LIST_FIELD(exprs, exprs, exprs); - WRITE_LIST_FIELD(relations, relations, relations); - WRITE_STRING_FIELD(stxcomment, stxcomment, stxcomment); - WRITE_BOOL_FIELD(transformed, transformed, transformed); - WRITE_BOOL_FIELD(if_not_exists, if_not_exists, if_not_exists); + WRITE_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, role, role, role); + WRITE_LIST_FIELD(options, options, options); + WRITE_INT_FIELD(action, action, action); } static void -_outAlterCollationStmt(OUT_TYPE(AlterCollationStmt, AlterCollationStmt) out, const AlterCollationStmt *node) +_outAlterRoleSetStmt(OUT_TYPE(AlterRoleSetStmt, AlterRoleSetStmt) out, const AlterRoleSetStmt *node) { - WRITE_LIST_FIELD(collname, collname, collname); + WRITE_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, role, role, role); + WRITE_STRING_FIELD(database, database, database); + WRITE_SPECIFIC_NODE_PTR_FIELD(VariableSetStmt, variable_set_stmt, setstmt, setstmt, setstmt); } static void -_outCallStmt(OUT_TYPE(CallStmt, CallStmt) out, const CallStmt *node) +_outDropRoleStmt(OUT_TYPE(DropRoleStmt, DropRoleStmt) out, const DropRoleStmt *node) { - WRITE_SPECIFIC_NODE_PTR_FIELD(FuncCall, func_call, funccall, funccall, funccall); - WRITE_SPECIFIC_NODE_PTR_FIELD(FuncExpr, func_expr, funcexpr, funcexpr, funcexpr); - WRITE_LIST_FIELD(outargs, outargs, outargs); + WRITE_LIST_FIELD(roles, roles, roles); + WRITE_BOOL_FIELD(missing_ok, missing_ok, missing_ok); } static void -_outAlterStatsStmt(OUT_TYPE(AlterStatsStmt, AlterStatsStmt) out, const AlterStatsStmt *node) +_outCreateSeqStmt(OUT_TYPE(CreateSeqStmt, CreateSeqStmt) out, const CreateSeqStmt *node) { - WRITE_LIST_FIELD(defnames, defnames, defnames); - WRITE_INT_FIELD(stxstattarget, stxstattarget, stxstattarget); - WRITE_BOOL_FIELD(missing_ok, missing_ok, missing_ok); + WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, sequence, sequence, sequence); + WRITE_LIST_FIELD(options, options, options); + WRITE_UINT_FIELD(owner_id, ownerId, ownerId); + WRITE_BOOL_FIELD(for_identity, for_identity, for_identity); + WRITE_BOOL_FIELD(if_not_exists, if_not_exists, if_not_exists); } static void -_outAExpr(OUT_TYPE(A_Expr, AExpr) out, const A_Expr *node) +_outAlterSeqStmt(OUT_TYPE(AlterSeqStmt, AlterSeqStmt) out, const AlterSeqStmt *node) { - WRITE_ENUM_FIELD(A_Expr_Kind, kind, kind, kind); - WRITE_LIST_FIELD(name, name, name); - WRITE_NODE_PTR_FIELD(lexpr, lexpr, lexpr); - WRITE_NODE_PTR_FIELD(rexpr, rexpr, rexpr); - WRITE_INT_FIELD(location, location, location); + WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, sequence, sequence, sequence); + WRITE_LIST_FIELD(options, options, options); + WRITE_BOOL_FIELD(for_identity, for_identity, for_identity); + WRITE_BOOL_FIELD(missing_ok, missing_ok, missing_ok); } static void -_outColumnRef(OUT_TYPE(ColumnRef, ColumnRef) out, const ColumnRef *node) +_outDefineStmt(OUT_TYPE(DefineStmt, DefineStmt) out, const DefineStmt *node) { - WRITE_LIST_FIELD(fields, fields, fields); - WRITE_INT_FIELD(location, location, location); + WRITE_ENUM_FIELD(ObjectType, kind, kind, kind); + WRITE_BOOL_FIELD(oldstyle, oldstyle, oldstyle); + WRITE_LIST_FIELD(defnames, defnames, defnames); + WRITE_LIST_FIELD(args, args, args); + WRITE_LIST_FIELD(definition, definition, definition); + WRITE_BOOL_FIELD(if_not_exists, if_not_exists, if_not_exists); + WRITE_BOOL_FIELD(replace, replace, replace); } static void -_outParamRef(OUT_TYPE(ParamRef, ParamRef) out, const ParamRef *node) +_outCreateDomainStmt(OUT_TYPE(CreateDomainStmt, CreateDomainStmt) out, const CreateDomainStmt *node) { - WRITE_INT_FIELD(number, number, number); - WRITE_INT_FIELD(location, location, location); + WRITE_LIST_FIELD(domainname, domainname, domainname); + WRITE_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, type_name, typeName, typeName); + WRITE_SPECIFIC_NODE_PTR_FIELD(CollateClause, collate_clause, coll_clause, collClause, collClause); + WRITE_LIST_FIELD(constraints, constraints, constraints); } static void -_outFuncCall(OUT_TYPE(FuncCall, FuncCall) out, const FuncCall *node) +_outCreateOpClassStmt(OUT_TYPE(CreateOpClassStmt, CreateOpClassStmt) out, const CreateOpClassStmt *node) { - WRITE_LIST_FIELD(funcname, funcname, funcname); - WRITE_LIST_FIELD(args, args, args); - WRITE_LIST_FIELD(agg_order, agg_order, agg_order); - WRITE_NODE_PTR_FIELD(agg_filter, agg_filter, agg_filter); - WRITE_SPECIFIC_NODE_PTR_FIELD(WindowDef, window_def, over, over, over); - WRITE_BOOL_FIELD(agg_within_group, agg_within_group, agg_within_group); - WRITE_BOOL_FIELD(agg_star, agg_star, agg_star); - WRITE_BOOL_FIELD(agg_distinct, agg_distinct, agg_distinct); - WRITE_BOOL_FIELD(func_variadic, func_variadic, func_variadic); - WRITE_ENUM_FIELD(CoercionForm, funcformat, funcformat, funcformat); - WRITE_INT_FIELD(location, location, location); + WRITE_LIST_FIELD(opclassname, opclassname, opclassname); + WRITE_LIST_FIELD(opfamilyname, opfamilyname, opfamilyname); + WRITE_STRING_FIELD(amname, amname, amname); + WRITE_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, datatype, datatype, datatype); + WRITE_LIST_FIELD(items, items, items); + WRITE_BOOL_FIELD(is_default, isDefault, isDefault); } static void -_outAStar(OUT_TYPE(A_Star, AStar) out, const A_Star *node) +_outCreateOpClassItem(OUT_TYPE(CreateOpClassItem, CreateOpClassItem) out, const CreateOpClassItem *node) { + WRITE_INT_FIELD(itemtype, itemtype, itemtype); + WRITE_SPECIFIC_NODE_PTR_FIELD(ObjectWithArgs, object_with_args, name, name, name); + WRITE_INT_FIELD(number, number, number); + WRITE_LIST_FIELD(order_family, order_family, order_family); + WRITE_LIST_FIELD(class_args, class_args, class_args); + WRITE_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, storedtype, storedtype, storedtype); } static void -_outAIndices(OUT_TYPE(A_Indices, AIndices) out, const A_Indices *node) +_outCreateOpFamilyStmt(OUT_TYPE(CreateOpFamilyStmt, CreateOpFamilyStmt) out, const CreateOpFamilyStmt *node) { - WRITE_BOOL_FIELD(is_slice, is_slice, is_slice); - WRITE_NODE_PTR_FIELD(lidx, lidx, lidx); - WRITE_NODE_PTR_FIELD(uidx, uidx, uidx); + WRITE_LIST_FIELD(opfamilyname, opfamilyname, opfamilyname); + WRITE_STRING_FIELD(amname, amname, amname); } static void -_outAIndirection(OUT_TYPE(A_Indirection, AIndirection) out, const A_Indirection *node) +_outAlterOpFamilyStmt(OUT_TYPE(AlterOpFamilyStmt, AlterOpFamilyStmt) out, const AlterOpFamilyStmt *node) { - WRITE_NODE_PTR_FIELD(arg, arg, arg); - WRITE_LIST_FIELD(indirection, indirection, indirection); + WRITE_LIST_FIELD(opfamilyname, opfamilyname, opfamilyname); + WRITE_STRING_FIELD(amname, amname, amname); + WRITE_BOOL_FIELD(is_drop, isDrop, isDrop); + WRITE_LIST_FIELD(items, items, items); } static void -_outAArrayExpr(OUT_TYPE(A_ArrayExpr, AArrayExpr) out, const A_ArrayExpr *node) +_outDropStmt(OUT_TYPE(DropStmt, DropStmt) out, const DropStmt *node) { - WRITE_LIST_FIELD(elements, elements, elements); - WRITE_INT_FIELD(location, location, location); + WRITE_LIST_FIELD(objects, objects, objects); + WRITE_ENUM_FIELD(ObjectType, remove_type, removeType, removeType); + WRITE_ENUM_FIELD(DropBehavior, behavior, behavior, behavior); + WRITE_BOOL_FIELD(missing_ok, missing_ok, missing_ok); + WRITE_BOOL_FIELD(concurrent, concurrent, concurrent); } static void -_outResTarget(OUT_TYPE(ResTarget, ResTarget) out, const ResTarget *node) +_outTruncateStmt(OUT_TYPE(TruncateStmt, TruncateStmt) out, const TruncateStmt *node) { - WRITE_STRING_FIELD(name, name, name); - WRITE_LIST_FIELD(indirection, indirection, indirection); - WRITE_NODE_PTR_FIELD(val, val, val); - WRITE_INT_FIELD(location, location, location); + WRITE_LIST_FIELD(relations, relations, relations); + WRITE_BOOL_FIELD(restart_seqs, restart_seqs, restart_seqs); + WRITE_ENUM_FIELD(DropBehavior, behavior, behavior, behavior); } static void -_outMultiAssignRef(OUT_TYPE(MultiAssignRef, MultiAssignRef) out, const MultiAssignRef *node) +_outCommentStmt(OUT_TYPE(CommentStmt, CommentStmt) out, const CommentStmt *node) { - WRITE_NODE_PTR_FIELD(source, source, source); - WRITE_INT_FIELD(colno, colno, colno); - WRITE_INT_FIELD(ncolumns, ncolumns, ncolumns); + WRITE_ENUM_FIELD(ObjectType, objtype, objtype, objtype); + WRITE_NODE_PTR_FIELD(object, object, object); + WRITE_STRING_FIELD(comment, comment, comment); } static void -_outTypeCast(OUT_TYPE(TypeCast, TypeCast) out, const TypeCast *node) +_outSecLabelStmt(OUT_TYPE(SecLabelStmt, SecLabelStmt) out, const SecLabelStmt *node) { - WRITE_NODE_PTR_FIELD(arg, arg, arg); - WRITE_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, type_name, typeName, typeName); - WRITE_INT_FIELD(location, location, location); + WRITE_ENUM_FIELD(ObjectType, objtype, objtype, objtype); + WRITE_NODE_PTR_FIELD(object, object, object); + WRITE_STRING_FIELD(provider, provider, provider); + WRITE_STRING_FIELD(label, label, label); } static void -_outCollateClause(OUT_TYPE(CollateClause, CollateClause) out, const CollateClause *node) +_outDeclareCursorStmt(OUT_TYPE(DeclareCursorStmt, DeclareCursorStmt) out, const DeclareCursorStmt *node) { - WRITE_NODE_PTR_FIELD(arg, arg, arg); - WRITE_LIST_FIELD(collname, collname, collname); - WRITE_INT_FIELD(location, location, location); + WRITE_STRING_FIELD(portalname, portalname, portalname); + WRITE_INT_FIELD(options, options, options); + WRITE_NODE_PTR_FIELD(query, query, query); } static void -_outSortBy(OUT_TYPE(SortBy, SortBy) out, const SortBy *node) +_outClosePortalStmt(OUT_TYPE(ClosePortalStmt, ClosePortalStmt) out, const ClosePortalStmt *node) { - WRITE_NODE_PTR_FIELD(node, node, node); - WRITE_ENUM_FIELD(SortByDir, sortby_dir, sortby_dir, sortby_dir); - WRITE_ENUM_FIELD(SortByNulls, sortby_nulls, sortby_nulls, sortby_nulls); - WRITE_LIST_FIELD(use_op, useOp, useOp); - WRITE_INT_FIELD(location, location, location); + WRITE_STRING_FIELD(portalname, portalname, portalname); } static void -_outWindowDef(OUT_TYPE(WindowDef, WindowDef) out, const WindowDef *node) +_outFetchStmt(OUT_TYPE(FetchStmt, FetchStmt) out, const FetchStmt *node) { - WRITE_STRING_FIELD(name, name, name); - WRITE_STRING_FIELD(refname, refname, refname); - WRITE_LIST_FIELD(partition_clause, partitionClause, partitionClause); - WRITE_LIST_FIELD(order_clause, orderClause, orderClause); - WRITE_INT_FIELD(frame_options, frameOptions, frameOptions); - WRITE_NODE_PTR_FIELD(start_offset, startOffset, startOffset); - WRITE_NODE_PTR_FIELD(end_offset, endOffset, endOffset); - WRITE_INT_FIELD(location, location, location); + WRITE_ENUM_FIELD(FetchDirection, direction, direction, direction); + WRITE_LONG_FIELD(how_many, howMany, howMany); + WRITE_STRING_FIELD(portalname, portalname, portalname); + WRITE_BOOL_FIELD(ismove, ismove, ismove); } static void -_outRangeSubselect(OUT_TYPE(RangeSubselect, RangeSubselect) out, const RangeSubselect *node) +_outIndexStmt(OUT_TYPE(IndexStmt, IndexStmt) out, const IndexStmt *node) { - WRITE_BOOL_FIELD(lateral, lateral, lateral); - WRITE_NODE_PTR_FIELD(subquery, subquery, subquery); - WRITE_SPECIFIC_NODE_PTR_FIELD(Alias, alias, alias, alias, alias); + WRITE_STRING_FIELD(idxname, idxname, idxname); + WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); + WRITE_STRING_FIELD(access_method, accessMethod, accessMethod); + WRITE_STRING_FIELD(table_space, tableSpace, tableSpace); + WRITE_LIST_FIELD(index_params, indexParams, indexParams); + WRITE_LIST_FIELD(index_including_params, indexIncludingParams, indexIncludingParams); + WRITE_LIST_FIELD(options, options, options); + WRITE_NODE_PTR_FIELD(where_clause, whereClause, whereClause); + WRITE_LIST_FIELD(exclude_op_names, excludeOpNames, excludeOpNames); + WRITE_STRING_FIELD(idxcomment, idxcomment, idxcomment); + WRITE_UINT_FIELD(index_oid, indexOid, indexOid); + WRITE_UINT_FIELD(old_number, oldNumber, oldNumber); + WRITE_UINT_FIELD(old_create_subid, oldCreateSubid, oldCreateSubid); + WRITE_UINT_FIELD(old_first_relfilelocator_subid, oldFirstRelfilelocatorSubid, oldFirstRelfilelocatorSubid); + WRITE_BOOL_FIELD(unique, unique, unique); + WRITE_BOOL_FIELD(nulls_not_distinct, nulls_not_distinct, nulls_not_distinct); + WRITE_BOOL_FIELD(primary, primary, primary); + WRITE_BOOL_FIELD(isconstraint, isconstraint, isconstraint); + WRITE_BOOL_FIELD(deferrable, deferrable, deferrable); + WRITE_BOOL_FIELD(initdeferred, initdeferred, initdeferred); + WRITE_BOOL_FIELD(transformed, transformed, transformed); + WRITE_BOOL_FIELD(concurrent, concurrent, concurrent); + WRITE_BOOL_FIELD(if_not_exists, if_not_exists, if_not_exists); + WRITE_BOOL_FIELD(reset_default_tblspc, reset_default_tblspc, reset_default_tblspc); } static void -_outRangeFunction(OUT_TYPE(RangeFunction, RangeFunction) out, const RangeFunction *node) +_outCreateStatsStmt(OUT_TYPE(CreateStatsStmt, CreateStatsStmt) out, const CreateStatsStmt *node) { - WRITE_BOOL_FIELD(lateral, lateral, lateral); - WRITE_BOOL_FIELD(ordinality, ordinality, ordinality); - WRITE_BOOL_FIELD(is_rowsfrom, is_rowsfrom, is_rowsfrom); - WRITE_LIST_FIELD(functions, functions, functions); - WRITE_SPECIFIC_NODE_PTR_FIELD(Alias, alias, alias, alias, alias); - WRITE_LIST_FIELD(coldeflist, coldeflist, coldeflist); + WRITE_LIST_FIELD(defnames, defnames, defnames); + WRITE_LIST_FIELD(stat_types, stat_types, stat_types); + WRITE_LIST_FIELD(exprs, exprs, exprs); + WRITE_LIST_FIELD(relations, relations, relations); + WRITE_STRING_FIELD(stxcomment, stxcomment, stxcomment); + WRITE_BOOL_FIELD(transformed, transformed, transformed); + WRITE_BOOL_FIELD(if_not_exists, if_not_exists, if_not_exists); } static void -_outRangeTableSample(OUT_TYPE(RangeTableSample, RangeTableSample) out, const RangeTableSample *node) +_outStatsElem(OUT_TYPE(StatsElem, StatsElem) out, const StatsElem *node) { - WRITE_NODE_PTR_FIELD(relation, relation, relation); - WRITE_LIST_FIELD(method, method, method); - WRITE_LIST_FIELD(args, args, args); - WRITE_NODE_PTR_FIELD(repeatable, repeatable, repeatable); - WRITE_INT_FIELD(location, location, location); + WRITE_STRING_FIELD(name, name, name); + WRITE_NODE_PTR_FIELD(expr, expr, expr); } static void -_outRangeTableFunc(OUT_TYPE(RangeTableFunc, RangeTableFunc) out, const RangeTableFunc *node) +_outAlterStatsStmt(OUT_TYPE(AlterStatsStmt, AlterStatsStmt) out, const AlterStatsStmt *node) { - WRITE_BOOL_FIELD(lateral, lateral, lateral); - WRITE_NODE_PTR_FIELD(docexpr, docexpr, docexpr); - WRITE_NODE_PTR_FIELD(rowexpr, rowexpr, rowexpr); - WRITE_LIST_FIELD(namespaces, namespaces, namespaces); - WRITE_LIST_FIELD(columns, columns, columns); - WRITE_SPECIFIC_NODE_PTR_FIELD(Alias, alias, alias, alias, alias); - WRITE_INT_FIELD(location, location, location); + WRITE_LIST_FIELD(defnames, defnames, defnames); + WRITE_INT_FIELD(stxstattarget, stxstattarget, stxstattarget); + WRITE_BOOL_FIELD(missing_ok, missing_ok, missing_ok); } static void -_outRangeTableFuncCol(OUT_TYPE(RangeTableFuncCol, RangeTableFuncCol) out, const RangeTableFuncCol *node) +_outCreateFunctionStmt(OUT_TYPE(CreateFunctionStmt, CreateFunctionStmt) out, const CreateFunctionStmt *node) { - WRITE_STRING_FIELD(colname, colname, colname); - WRITE_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, type_name, typeName, typeName); - WRITE_BOOL_FIELD(for_ordinality, for_ordinality, for_ordinality); - WRITE_BOOL_FIELD(is_not_null, is_not_null, is_not_null); - WRITE_NODE_PTR_FIELD(colexpr, colexpr, colexpr); - WRITE_NODE_PTR_FIELD(coldefexpr, coldefexpr, coldefexpr); - WRITE_INT_FIELD(location, location, location); + WRITE_BOOL_FIELD(is_procedure, is_procedure, is_procedure); + WRITE_BOOL_FIELD(replace, replace, replace); + WRITE_LIST_FIELD(funcname, funcname, funcname); + WRITE_LIST_FIELD(parameters, parameters, parameters); + WRITE_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, return_type, returnType, returnType); + WRITE_LIST_FIELD(options, options, options); + WRITE_NODE_PTR_FIELD(sql_body, sql_body, sql_body); } static void -_outTypeName(OUT_TYPE(TypeName, TypeName) out, const TypeName *node) +_outFunctionParameter(OUT_TYPE(FunctionParameter, FunctionParameter) out, const FunctionParameter *node) { - WRITE_LIST_FIELD(names, names, names); - WRITE_UINT_FIELD(type_oid, typeOid, typeOid); - WRITE_BOOL_FIELD(setof, setof, setof); - WRITE_BOOL_FIELD(pct_type, pct_type, pct_type); - WRITE_LIST_FIELD(typmods, typmods, typmods); - WRITE_INT_FIELD(typemod, typemod, typemod); - WRITE_LIST_FIELD(array_bounds, arrayBounds, arrayBounds); - WRITE_INT_FIELD(location, location, location); + WRITE_STRING_FIELD(name, name, name); + WRITE_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, arg_type, argType, argType); + WRITE_ENUM_FIELD(FunctionParameterMode, mode, mode, mode); + WRITE_NODE_PTR_FIELD(defexpr, defexpr, defexpr); } static void -_outColumnDef(OUT_TYPE(ColumnDef, ColumnDef) out, const ColumnDef *node) +_outAlterFunctionStmt(OUT_TYPE(AlterFunctionStmt, AlterFunctionStmt) out, const AlterFunctionStmt *node) { - WRITE_STRING_FIELD(colname, colname, colname); - WRITE_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, type_name, typeName, typeName); - WRITE_STRING_FIELD(compression, compression, compression); - WRITE_INT_FIELD(inhcount, inhcount, inhcount); - WRITE_BOOL_FIELD(is_local, is_local, is_local); - WRITE_BOOL_FIELD(is_not_null, is_not_null, is_not_null); - WRITE_BOOL_FIELD(is_from_type, is_from_type, is_from_type); - WRITE_CHAR_FIELD(storage, storage, storage); - WRITE_NODE_PTR_FIELD(raw_default, raw_default, raw_default); - WRITE_NODE_PTR_FIELD(cooked_default, cooked_default, cooked_default); - WRITE_CHAR_FIELD(identity, identity, identity); - WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, identity_sequence, identitySequence, identitySequence); - WRITE_CHAR_FIELD(generated, generated, generated); - WRITE_SPECIFIC_NODE_PTR_FIELD(CollateClause, collate_clause, coll_clause, collClause, collClause); - WRITE_UINT_FIELD(coll_oid, collOid, collOid); - WRITE_LIST_FIELD(constraints, constraints, constraints); - WRITE_LIST_FIELD(fdwoptions, fdwoptions, fdwoptions); - WRITE_INT_FIELD(location, location, location); + WRITE_ENUM_FIELD(ObjectType, objtype, objtype, objtype); + WRITE_SPECIFIC_NODE_PTR_FIELD(ObjectWithArgs, object_with_args, func, func, func); + WRITE_LIST_FIELD(actions, actions, actions); } static void -_outIndexElem(OUT_TYPE(IndexElem, IndexElem) out, const IndexElem *node) +_outDoStmt(OUT_TYPE(DoStmt, DoStmt) out, const DoStmt *node) { - WRITE_STRING_FIELD(name, name, name); - WRITE_NODE_PTR_FIELD(expr, expr, expr); - WRITE_STRING_FIELD(indexcolname, indexcolname, indexcolname); - WRITE_LIST_FIELD(collation, collation, collation); - WRITE_LIST_FIELD(opclass, opclass, opclass); - WRITE_LIST_FIELD(opclassopts, opclassopts, opclassopts); - WRITE_ENUM_FIELD(SortByDir, ordering, ordering, ordering); - WRITE_ENUM_FIELD(SortByNulls, nulls_ordering, nulls_ordering, nulls_ordering); + WRITE_LIST_FIELD(args, args, args); } static void -_outStatsElem(OUT_TYPE(StatsElem, StatsElem) out, const StatsElem *node) +_outInlineCodeBlock(OUT_TYPE(InlineCodeBlock, InlineCodeBlock) out, const InlineCodeBlock *node) { - WRITE_STRING_FIELD(name, name, name); - WRITE_NODE_PTR_FIELD(expr, expr, expr); + WRITE_STRING_FIELD(source_text, source_text, source_text); + WRITE_UINT_FIELD(lang_oid, langOid, langOid); + WRITE_BOOL_FIELD(lang_is_trusted, langIsTrusted, langIsTrusted); + WRITE_BOOL_FIELD(atomic, atomic, atomic); } static void -_outConstraint(OUT_TYPE(Constraint, Constraint) out, const Constraint *node) +_outCallStmt(OUT_TYPE(CallStmt, CallStmt) out, const CallStmt *node) { - WRITE_ENUM_FIELD(ConstrType, contype, contype, contype); - WRITE_STRING_FIELD(conname, conname, conname); - WRITE_BOOL_FIELD(deferrable, deferrable, deferrable); - WRITE_BOOL_FIELD(initdeferred, initdeferred, initdeferred); - WRITE_INT_FIELD(location, location, location); - WRITE_BOOL_FIELD(is_no_inherit, is_no_inherit, is_no_inherit); - WRITE_NODE_PTR_FIELD(raw_expr, raw_expr, raw_expr); - WRITE_STRING_FIELD(cooked_expr, cooked_expr, cooked_expr); - WRITE_CHAR_FIELD(generated_when, generated_when, generated_when); - WRITE_BOOL_FIELD(nulls_not_distinct, nulls_not_distinct, nulls_not_distinct); - WRITE_LIST_FIELD(keys, keys, keys); - WRITE_LIST_FIELD(including, including, including); - WRITE_LIST_FIELD(exclusions, exclusions, exclusions); + WRITE_SPECIFIC_NODE_PTR_FIELD(FuncCall, func_call, funccall, funccall, funccall); + WRITE_SPECIFIC_NODE_PTR_FIELD(FuncExpr, func_expr, funcexpr, funcexpr, funcexpr); + WRITE_LIST_FIELD(outargs, outargs, outargs); +} + +static void +_outCallContext(OUT_TYPE(CallContext, CallContext) out, const CallContext *node) +{ + WRITE_BOOL_FIELD(atomic, atomic, atomic); +} + +static void +_outRenameStmt(OUT_TYPE(RenameStmt, RenameStmt) out, const RenameStmt *node) +{ + WRITE_ENUM_FIELD(ObjectType, rename_type, renameType, renameType); + WRITE_ENUM_FIELD(ObjectType, relation_type, relationType, relationType); + WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); + WRITE_NODE_PTR_FIELD(object, object, object); + WRITE_STRING_FIELD(subname, subname, subname); + WRITE_STRING_FIELD(newname, newname, newname); + WRITE_ENUM_FIELD(DropBehavior, behavior, behavior, behavior); + WRITE_BOOL_FIELD(missing_ok, missing_ok, missing_ok); +} + +static void +_outAlterObjectDependsStmt(OUT_TYPE(AlterObjectDependsStmt, AlterObjectDependsStmt) out, const AlterObjectDependsStmt *node) +{ + WRITE_ENUM_FIELD(ObjectType, object_type, objectType, objectType); + WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); + WRITE_NODE_PTR_FIELD(object, object, object); + WRITE_SPECIFIC_NODE_PTR_FIELD(String, string, extname, extname, extname); + WRITE_BOOL_FIELD(remove, remove, remove); +} + +static void +_outAlterObjectSchemaStmt(OUT_TYPE(AlterObjectSchemaStmt, AlterObjectSchemaStmt) out, const AlterObjectSchemaStmt *node) +{ + WRITE_ENUM_FIELD(ObjectType, object_type, objectType, objectType); + WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); + WRITE_NODE_PTR_FIELD(object, object, object); + WRITE_STRING_FIELD(newschema, newschema, newschema); + WRITE_BOOL_FIELD(missing_ok, missing_ok, missing_ok); +} + +static void +_outAlterOwnerStmt(OUT_TYPE(AlterOwnerStmt, AlterOwnerStmt) out, const AlterOwnerStmt *node) +{ + WRITE_ENUM_FIELD(ObjectType, object_type, objectType, objectType); + WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); + WRITE_NODE_PTR_FIELD(object, object, object); + WRITE_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, newowner, newowner, newowner); +} + +static void +_outAlterOperatorStmt(OUT_TYPE(AlterOperatorStmt, AlterOperatorStmt) out, const AlterOperatorStmt *node) +{ + WRITE_SPECIFIC_NODE_PTR_FIELD(ObjectWithArgs, object_with_args, opername, opername, opername); WRITE_LIST_FIELD(options, options, options); - WRITE_STRING_FIELD(indexname, indexname, indexname); - WRITE_STRING_FIELD(indexspace, indexspace, indexspace); - WRITE_BOOL_FIELD(reset_default_tblspc, reset_default_tblspc, reset_default_tblspc); - WRITE_STRING_FIELD(access_method, access_method, access_method); - WRITE_NODE_PTR_FIELD(where_clause, where_clause, where_clause); - WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, pktable, pktable, pktable); - WRITE_LIST_FIELD(fk_attrs, fk_attrs, fk_attrs); - WRITE_LIST_FIELD(pk_attrs, pk_attrs, pk_attrs); - WRITE_CHAR_FIELD(fk_matchtype, fk_matchtype, fk_matchtype); - WRITE_CHAR_FIELD(fk_upd_action, fk_upd_action, fk_upd_action); - WRITE_CHAR_FIELD(fk_del_action, fk_del_action, fk_del_action); - WRITE_LIST_FIELD(fk_del_set_cols, fk_del_set_cols, fk_del_set_cols); - WRITE_LIST_FIELD(old_conpfeqop, old_conpfeqop, old_conpfeqop); - WRITE_UINT_FIELD(old_pktable_oid, old_pktable_oid, old_pktable_oid); - WRITE_BOOL_FIELD(skip_validation, skip_validation, skip_validation); - WRITE_BOOL_FIELD(initially_valid, initially_valid, initially_valid); } static void -_outDefElem(OUT_TYPE(DefElem, DefElem) out, const DefElem *node) +_outAlterTypeStmt(OUT_TYPE(AlterTypeStmt, AlterTypeStmt) out, const AlterTypeStmt *node) { - WRITE_STRING_FIELD(defnamespace, defnamespace, defnamespace); - WRITE_STRING_FIELD(defname, defname, defname); - WRITE_NODE_PTR_FIELD(arg, arg, arg); - WRITE_ENUM_FIELD(DefElemAction, defaction, defaction, defaction); - WRITE_INT_FIELD(location, location, location); + WRITE_LIST_FIELD(type_name, typeName, typeName); + WRITE_LIST_FIELD(options, options, options); } static void -_outRangeTblEntry(OUT_TYPE(RangeTblEntry, RangeTblEntry) out, const RangeTblEntry *node) +_outRuleStmt(OUT_TYPE(RuleStmt, RuleStmt) out, const RuleStmt *node) { - WRITE_ENUM_FIELD(RTEKind, rtekind, rtekind, rtekind); - WRITE_UINT_FIELD(relid, relid, relid); - WRITE_CHAR_FIELD(relkind, relkind, relkind); - WRITE_INT_FIELD(rellockmode, rellockmode, rellockmode); - WRITE_SPECIFIC_NODE_PTR_FIELD(TableSampleClause, table_sample_clause, tablesample, tablesample, tablesample); - WRITE_SPECIFIC_NODE_PTR_FIELD(Query, query, subquery, subquery, subquery); - WRITE_BOOL_FIELD(security_barrier, security_barrier, security_barrier); - WRITE_ENUM_FIELD(JoinType, jointype, jointype, jointype); - WRITE_INT_FIELD(joinmergedcols, joinmergedcols, joinmergedcols); - WRITE_LIST_FIELD(joinaliasvars, joinaliasvars, joinaliasvars); - WRITE_LIST_FIELD(joinleftcols, joinleftcols, joinleftcols); - WRITE_LIST_FIELD(joinrightcols, joinrightcols, joinrightcols); - WRITE_SPECIFIC_NODE_PTR_FIELD(Alias, alias, join_using_alias, join_using_alias, join_using_alias); - WRITE_LIST_FIELD(functions, functions, functions); - WRITE_BOOL_FIELD(funcordinality, funcordinality, funcordinality); - WRITE_SPECIFIC_NODE_PTR_FIELD(TableFunc, table_func, tablefunc, tablefunc, tablefunc); - WRITE_LIST_FIELD(values_lists, values_lists, values_lists); - WRITE_STRING_FIELD(ctename, ctename, ctename); - WRITE_UINT_FIELD(ctelevelsup, ctelevelsup, ctelevelsup); - WRITE_BOOL_FIELD(self_reference, self_reference, self_reference); - WRITE_LIST_FIELD(coltypes, coltypes, coltypes); - WRITE_LIST_FIELD(coltypmods, coltypmods, coltypmods); - WRITE_LIST_FIELD(colcollations, colcollations, colcollations); - WRITE_STRING_FIELD(enrname, enrname, enrname); - WRITE_FLOAT_FIELD(enrtuples, enrtuples, enrtuples); - WRITE_SPECIFIC_NODE_PTR_FIELD(Alias, alias, alias, alias, alias); - WRITE_SPECIFIC_NODE_PTR_FIELD(Alias, alias, eref, eref, eref); - WRITE_BOOL_FIELD(lateral, lateral, lateral); - WRITE_BOOL_FIELD(inh, inh, inh); - WRITE_BOOL_FIELD(in_from_cl, inFromCl, inFromCl); - WRITE_UINT_FIELD(required_perms, requiredPerms, requiredPerms); - WRITE_UINT_FIELD(check_as_user, checkAsUser, checkAsUser); - WRITE_BITMAPSET_FIELD(selected_cols, selectedCols, selectedCols); - WRITE_BITMAPSET_FIELD(inserted_cols, insertedCols, insertedCols); - WRITE_BITMAPSET_FIELD(updated_cols, updatedCols, updatedCols); - WRITE_BITMAPSET_FIELD(extra_updated_cols, extraUpdatedCols, extraUpdatedCols); - WRITE_LIST_FIELD(security_quals, securityQuals, securityQuals); + WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); + WRITE_STRING_FIELD(rulename, rulename, rulename); + WRITE_NODE_PTR_FIELD(where_clause, whereClause, whereClause); + WRITE_ENUM_FIELD(CmdType, event, event, event); + WRITE_BOOL_FIELD(instead, instead, instead); + WRITE_LIST_FIELD(actions, actions, actions); + WRITE_BOOL_FIELD(replace, replace, replace); } static void -_outRangeTblFunction(OUT_TYPE(RangeTblFunction, RangeTblFunction) out, const RangeTblFunction *node) +_outNotifyStmt(OUT_TYPE(NotifyStmt, NotifyStmt) out, const NotifyStmt *node) { - WRITE_NODE_PTR_FIELD(funcexpr, funcexpr, funcexpr); - WRITE_INT_FIELD(funccolcount, funccolcount, funccolcount); - WRITE_LIST_FIELD(funccolnames, funccolnames, funccolnames); - WRITE_LIST_FIELD(funccoltypes, funccoltypes, funccoltypes); - WRITE_LIST_FIELD(funccoltypmods, funccoltypmods, funccoltypmods); - WRITE_LIST_FIELD(funccolcollations, funccolcollations, funccolcollations); - WRITE_BITMAPSET_FIELD(funcparams, funcparams, funcparams); + WRITE_STRING_FIELD(conditionname, conditionname, conditionname); + WRITE_STRING_FIELD(payload, payload, payload); } static void -_outTableSampleClause(OUT_TYPE(TableSampleClause, TableSampleClause) out, const TableSampleClause *node) +_outListenStmt(OUT_TYPE(ListenStmt, ListenStmt) out, const ListenStmt *node) { - WRITE_UINT_FIELD(tsmhandler, tsmhandler, tsmhandler); - WRITE_LIST_FIELD(args, args, args); - WRITE_NODE_PTR_FIELD(repeatable, repeatable, repeatable); + WRITE_STRING_FIELD(conditionname, conditionname, conditionname); } static void -_outWithCheckOption(OUT_TYPE(WithCheckOption, WithCheckOption) out, const WithCheckOption *node) +_outUnlistenStmt(OUT_TYPE(UnlistenStmt, UnlistenStmt) out, const UnlistenStmt *node) { - WRITE_ENUM_FIELD(WCOKind, kind, kind, kind); - WRITE_STRING_FIELD(relname, relname, relname); - WRITE_STRING_FIELD(polname, polname, polname); - WRITE_NODE_PTR_FIELD(qual, qual, qual); - WRITE_BOOL_FIELD(cascaded, cascaded, cascaded); + WRITE_STRING_FIELD(conditionname, conditionname, conditionname); } static void -_outSortGroupClause(OUT_TYPE(SortGroupClause, SortGroupClause) out, const SortGroupClause *node) +_outTransactionStmt(OUT_TYPE(TransactionStmt, TransactionStmt) out, const TransactionStmt *node) { - WRITE_UINT_FIELD(tle_sort_group_ref, tleSortGroupRef, tleSortGroupRef); - WRITE_UINT_FIELD(eqop, eqop, eqop); - WRITE_UINT_FIELD(sortop, sortop, sortop); - WRITE_BOOL_FIELD(nulls_first, nulls_first, nulls_first); - WRITE_BOOL_FIELD(hashable, hashable, hashable); + WRITE_ENUM_FIELD(TransactionStmtKind, kind, kind, kind); + WRITE_LIST_FIELD(options, options, options); + WRITE_STRING_FIELD(savepoint_name, savepoint_name, savepoint_name); + WRITE_STRING_FIELD(gid, gid, gid); + WRITE_BOOL_FIELD(chain, chain, chain); } static void -_outGroupingSet(OUT_TYPE(GroupingSet, GroupingSet) out, const GroupingSet *node) +_outCompositeTypeStmt(OUT_TYPE(CompositeTypeStmt, CompositeTypeStmt) out, const CompositeTypeStmt *node) { - WRITE_ENUM_FIELD(GroupingSetKind, kind, kind, kind); - WRITE_LIST_FIELD(content, content, content); - WRITE_INT_FIELD(location, location, location); + WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, typevar, typevar, typevar); + WRITE_LIST_FIELD(coldeflist, coldeflist, coldeflist); } static void -_outWindowClause(OUT_TYPE(WindowClause, WindowClause) out, const WindowClause *node) +_outCreateEnumStmt(OUT_TYPE(CreateEnumStmt, CreateEnumStmt) out, const CreateEnumStmt *node) { - WRITE_STRING_FIELD(name, name, name); - WRITE_STRING_FIELD(refname, refname, refname); - WRITE_LIST_FIELD(partition_clause, partitionClause, partitionClause); - WRITE_LIST_FIELD(order_clause, orderClause, orderClause); - WRITE_INT_FIELD(frame_options, frameOptions, frameOptions); - WRITE_NODE_PTR_FIELD(start_offset, startOffset, startOffset); - WRITE_NODE_PTR_FIELD(end_offset, endOffset, endOffset); - WRITE_LIST_FIELD(run_condition, runCondition, runCondition); - WRITE_UINT_FIELD(start_in_range_func, startInRangeFunc, startInRangeFunc); - WRITE_UINT_FIELD(end_in_range_func, endInRangeFunc, endInRangeFunc); - WRITE_UINT_FIELD(in_range_coll, inRangeColl, inRangeColl); - WRITE_BOOL_FIELD(in_range_asc, inRangeAsc, inRangeAsc); - WRITE_BOOL_FIELD(in_range_nulls_first, inRangeNullsFirst, inRangeNullsFirst); - WRITE_UINT_FIELD(winref, winref, winref); - WRITE_BOOL_FIELD(copied_order, copiedOrder, copiedOrder); + WRITE_LIST_FIELD(type_name, typeName, typeName); + WRITE_LIST_FIELD(vals, vals, vals); +} + +static void +_outCreateRangeStmt(OUT_TYPE(CreateRangeStmt, CreateRangeStmt) out, const CreateRangeStmt *node) +{ + WRITE_LIST_FIELD(type_name, typeName, typeName); + WRITE_LIST_FIELD(params, params, params); +} + +static void +_outAlterEnumStmt(OUT_TYPE(AlterEnumStmt, AlterEnumStmt) out, const AlterEnumStmt *node) +{ + WRITE_LIST_FIELD(type_name, typeName, typeName); + WRITE_STRING_FIELD(old_val, oldVal, oldVal); + WRITE_STRING_FIELD(new_val, newVal, newVal); + WRITE_STRING_FIELD(new_val_neighbor, newValNeighbor, newValNeighbor); + WRITE_BOOL_FIELD(new_val_is_after, newValIsAfter, newValIsAfter); + WRITE_BOOL_FIELD(skip_if_new_val_exists, skipIfNewValExists, skipIfNewValExists); +} + +static void +_outViewStmt(OUT_TYPE(ViewStmt, ViewStmt) out, const ViewStmt *node) +{ + WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, view, view, view); + WRITE_LIST_FIELD(aliases, aliases, aliases); + WRITE_NODE_PTR_FIELD(query, query, query); + WRITE_BOOL_FIELD(replace, replace, replace); + WRITE_LIST_FIELD(options, options, options); + WRITE_ENUM_FIELD(ViewCheckOption, with_check_option, withCheckOption, withCheckOption); +} + +static void +_outLoadStmt(OUT_TYPE(LoadStmt, LoadStmt) out, const LoadStmt *node) +{ + WRITE_STRING_FIELD(filename, filename, filename); +} + +static void +_outCreatedbStmt(OUT_TYPE(CreatedbStmt, CreatedbStmt) out, const CreatedbStmt *node) +{ + WRITE_STRING_FIELD(dbname, dbname, dbname); + WRITE_LIST_FIELD(options, options, options); +} + +static void +_outAlterDatabaseStmt(OUT_TYPE(AlterDatabaseStmt, AlterDatabaseStmt) out, const AlterDatabaseStmt *node) +{ + WRITE_STRING_FIELD(dbname, dbname, dbname); + WRITE_LIST_FIELD(options, options, options); +} + +static void +_outAlterDatabaseRefreshCollStmt(OUT_TYPE(AlterDatabaseRefreshCollStmt, AlterDatabaseRefreshCollStmt) out, const AlterDatabaseRefreshCollStmt *node) +{ + WRITE_STRING_FIELD(dbname, dbname, dbname); +} + +static void +_outAlterDatabaseSetStmt(OUT_TYPE(AlterDatabaseSetStmt, AlterDatabaseSetStmt) out, const AlterDatabaseSetStmt *node) +{ + WRITE_STRING_FIELD(dbname, dbname, dbname); + WRITE_SPECIFIC_NODE_PTR_FIELD(VariableSetStmt, variable_set_stmt, setstmt, setstmt, setstmt); +} + +static void +_outDropdbStmt(OUT_TYPE(DropdbStmt, DropdbStmt) out, const DropdbStmt *node) +{ + WRITE_STRING_FIELD(dbname, dbname, dbname); + WRITE_BOOL_FIELD(missing_ok, missing_ok, missing_ok); + WRITE_LIST_FIELD(options, options, options); } static void -_outObjectWithArgs(OUT_TYPE(ObjectWithArgs, ObjectWithArgs) out, const ObjectWithArgs *node) +_outAlterSystemStmt(OUT_TYPE(AlterSystemStmt, AlterSystemStmt) out, const AlterSystemStmt *node) { - WRITE_LIST_FIELD(objname, objname, objname); - WRITE_LIST_FIELD(objargs, objargs, objargs); - WRITE_LIST_FIELD(objfuncargs, objfuncargs, objfuncargs); - WRITE_BOOL_FIELD(args_unspecified, args_unspecified, args_unspecified); + WRITE_SPECIFIC_NODE_PTR_FIELD(VariableSetStmt, variable_set_stmt, setstmt, setstmt, setstmt); } static void -_outAccessPriv(OUT_TYPE(AccessPriv, AccessPriv) out, const AccessPriv *node) +_outClusterStmt(OUT_TYPE(ClusterStmt, ClusterStmt) out, const ClusterStmt *node) { - WRITE_STRING_FIELD(priv_name, priv_name, priv_name); - WRITE_LIST_FIELD(cols, cols, cols); + WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); + WRITE_STRING_FIELD(indexname, indexname, indexname); + WRITE_LIST_FIELD(params, params, params); } static void -_outCreateOpClassItem(OUT_TYPE(CreateOpClassItem, CreateOpClassItem) out, const CreateOpClassItem *node) +_outVacuumStmt(OUT_TYPE(VacuumStmt, VacuumStmt) out, const VacuumStmt *node) { - WRITE_INT_FIELD(itemtype, itemtype, itemtype); - WRITE_SPECIFIC_NODE_PTR_FIELD(ObjectWithArgs, object_with_args, name, name, name); - WRITE_INT_FIELD(number, number, number); - WRITE_LIST_FIELD(order_family, order_family, order_family); - WRITE_LIST_FIELD(class_args, class_args, class_args); - WRITE_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, storedtype, storedtype, storedtype); + WRITE_LIST_FIELD(options, options, options); + WRITE_LIST_FIELD(rels, rels, rels); + WRITE_BOOL_FIELD(is_vacuumcmd, is_vacuumcmd, is_vacuumcmd); } static void -_outTableLikeClause(OUT_TYPE(TableLikeClause, TableLikeClause) out, const TableLikeClause *node) +_outVacuumRelation(OUT_TYPE(VacuumRelation, VacuumRelation) out, const VacuumRelation *node) { WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); - WRITE_UINT_FIELD(options, options, options); - WRITE_UINT_FIELD(relation_oid, relationOid, relationOid); + WRITE_UINT_FIELD(oid, oid, oid); + WRITE_LIST_FIELD(va_cols, va_cols, va_cols); } static void -_outFunctionParameter(OUT_TYPE(FunctionParameter, FunctionParameter) out, const FunctionParameter *node) +_outExplainStmt(OUT_TYPE(ExplainStmt, ExplainStmt) out, const ExplainStmt *node) { - WRITE_STRING_FIELD(name, name, name); - WRITE_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, arg_type, argType, argType); - WRITE_ENUM_FIELD(FunctionParameterMode, mode, mode, mode); - WRITE_NODE_PTR_FIELD(defexpr, defexpr, defexpr); + WRITE_NODE_PTR_FIELD(query, query, query); + WRITE_LIST_FIELD(options, options, options); } static void -_outLockingClause(OUT_TYPE(LockingClause, LockingClause) out, const LockingClause *node) +_outCreateTableAsStmt(OUT_TYPE(CreateTableAsStmt, CreateTableAsStmt) out, const CreateTableAsStmt *node) { - WRITE_LIST_FIELD(locked_rels, lockedRels, lockedRels); - WRITE_ENUM_FIELD(LockClauseStrength, strength, strength, strength); - WRITE_ENUM_FIELD(LockWaitPolicy, wait_policy, waitPolicy, waitPolicy); + WRITE_NODE_PTR_FIELD(query, query, query); + WRITE_SPECIFIC_NODE_PTR_FIELD(IntoClause, into_clause, into, into, into); + WRITE_ENUM_FIELD(ObjectType, objtype, objtype, objtype); + WRITE_BOOL_FIELD(is_select_into, is_select_into, is_select_into); + WRITE_BOOL_FIELD(if_not_exists, if_not_exists, if_not_exists); } static void -_outRowMarkClause(OUT_TYPE(RowMarkClause, RowMarkClause) out, const RowMarkClause *node) +_outRefreshMatViewStmt(OUT_TYPE(RefreshMatViewStmt, RefreshMatViewStmt) out, const RefreshMatViewStmt *node) { - WRITE_UINT_FIELD(rti, rti, rti); - WRITE_ENUM_FIELD(LockClauseStrength, strength, strength, strength); - WRITE_ENUM_FIELD(LockWaitPolicy, wait_policy, waitPolicy, waitPolicy); - WRITE_BOOL_FIELD(pushed_down, pushedDown, pushedDown); + WRITE_BOOL_FIELD(concurrent, concurrent, concurrent); + WRITE_BOOL_FIELD(skip_data, skipData, skipData); + WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); } static void -_outXmlSerialize(OUT_TYPE(XmlSerialize, XmlSerialize) out, const XmlSerialize *node) +_outCheckPointStmt(OUT_TYPE(CheckPointStmt, CheckPointStmt) out, const CheckPointStmt *node) { - WRITE_ENUM_FIELD(XmlOptionType, xmloption, xmloption, xmloption); - WRITE_NODE_PTR_FIELD(expr, expr, expr); - WRITE_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, type_name, typeName, typeName); - WRITE_INT_FIELD(location, location, location); } static void -_outWithClause(OUT_TYPE(WithClause, WithClause) out, const WithClause *node) +_outDiscardStmt(OUT_TYPE(DiscardStmt, DiscardStmt) out, const DiscardStmt *node) { - WRITE_LIST_FIELD(ctes, ctes, ctes); - WRITE_BOOL_FIELD(recursive, recursive, recursive); - WRITE_INT_FIELD(location, location, location); + WRITE_ENUM_FIELD(DiscardMode, target, target, target); } static void -_outInferClause(OUT_TYPE(InferClause, InferClause) out, const InferClause *node) +_outLockStmt(OUT_TYPE(LockStmt, LockStmt) out, const LockStmt *node) { - WRITE_LIST_FIELD(index_elems, indexElems, indexElems); - WRITE_NODE_PTR_FIELD(where_clause, whereClause, whereClause); - WRITE_STRING_FIELD(conname, conname, conname); - WRITE_INT_FIELD(location, location, location); + WRITE_LIST_FIELD(relations, relations, relations); + WRITE_INT_FIELD(mode, mode, mode); + WRITE_BOOL_FIELD(nowait, nowait, nowait); } static void -_outOnConflictClause(OUT_TYPE(OnConflictClause, OnConflictClause) out, const OnConflictClause *node) +_outConstraintsSetStmt(OUT_TYPE(ConstraintsSetStmt, ConstraintsSetStmt) out, const ConstraintsSetStmt *node) { - WRITE_ENUM_FIELD(OnConflictAction, action, action, action); - WRITE_SPECIFIC_NODE_PTR_FIELD(InferClause, infer_clause, infer, infer, infer); - WRITE_LIST_FIELD(target_list, targetList, targetList); - WRITE_NODE_PTR_FIELD(where_clause, whereClause, whereClause); - WRITE_INT_FIELD(location, location, location); + WRITE_LIST_FIELD(constraints, constraints, constraints); + WRITE_BOOL_FIELD(deferred, deferred, deferred); } static void -_outCTESearchClause(OUT_TYPE(CTESearchClause, CTESearchClause) out, const CTESearchClause *node) +_outReindexStmt(OUT_TYPE(ReindexStmt, ReindexStmt) out, const ReindexStmt *node) { - WRITE_LIST_FIELD(search_col_list, search_col_list, search_col_list); - WRITE_BOOL_FIELD(search_breadth_first, search_breadth_first, search_breadth_first); - WRITE_STRING_FIELD(search_seq_column, search_seq_column, search_seq_column); - WRITE_INT_FIELD(location, location, location); + WRITE_ENUM_FIELD(ReindexObjectType, kind, kind, kind); + WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); + WRITE_STRING_FIELD(name, name, name); + WRITE_LIST_FIELD(params, params, params); } static void -_outCTECycleClause(OUT_TYPE(CTECycleClause, CTECycleClause) out, const CTECycleClause *node) +_outCreateConversionStmt(OUT_TYPE(CreateConversionStmt, CreateConversionStmt) out, const CreateConversionStmt *node) { - WRITE_LIST_FIELD(cycle_col_list, cycle_col_list, cycle_col_list); - WRITE_STRING_FIELD(cycle_mark_column, cycle_mark_column, cycle_mark_column); - WRITE_NODE_PTR_FIELD(cycle_mark_value, cycle_mark_value, cycle_mark_value); - WRITE_NODE_PTR_FIELD(cycle_mark_default, cycle_mark_default, cycle_mark_default); - WRITE_STRING_FIELD(cycle_path_column, cycle_path_column, cycle_path_column); - WRITE_INT_FIELD(location, location, location); - WRITE_UINT_FIELD(cycle_mark_type, cycle_mark_type, cycle_mark_type); - WRITE_INT_FIELD(cycle_mark_typmod, cycle_mark_typmod, cycle_mark_typmod); - WRITE_UINT_FIELD(cycle_mark_collation, cycle_mark_collation, cycle_mark_collation); - WRITE_UINT_FIELD(cycle_mark_neop, cycle_mark_neop, cycle_mark_neop); + WRITE_LIST_FIELD(conversion_name, conversion_name, conversion_name); + WRITE_STRING_FIELD(for_encoding_name, for_encoding_name, for_encoding_name); + WRITE_STRING_FIELD(to_encoding_name, to_encoding_name, to_encoding_name); + WRITE_LIST_FIELD(func_name, func_name, func_name); + WRITE_BOOL_FIELD(def, def, def); } static void -_outCommonTableExpr(OUT_TYPE(CommonTableExpr, CommonTableExpr) out, const CommonTableExpr *node) +_outCreateCastStmt(OUT_TYPE(CreateCastStmt, CreateCastStmt) out, const CreateCastStmt *node) { - WRITE_STRING_FIELD(ctename, ctename, ctename); - WRITE_LIST_FIELD(aliascolnames, aliascolnames, aliascolnames); - WRITE_ENUM_FIELD(CTEMaterialize, ctematerialized, ctematerialized, ctematerialized); - WRITE_NODE_PTR_FIELD(ctequery, ctequery, ctequery); - WRITE_SPECIFIC_NODE_PTR_FIELD(CTESearchClause, ctesearch_clause, search_clause, search_clause, search_clause); - WRITE_SPECIFIC_NODE_PTR_FIELD(CTECycleClause, ctecycle_clause, cycle_clause, cycle_clause, cycle_clause); - WRITE_INT_FIELD(location, location, location); - WRITE_BOOL_FIELD(cterecursive, cterecursive, cterecursive); - WRITE_INT_FIELD(cterefcount, cterefcount, cterefcount); - WRITE_LIST_FIELD(ctecolnames, ctecolnames, ctecolnames); - WRITE_LIST_FIELD(ctecoltypes, ctecoltypes, ctecoltypes); - WRITE_LIST_FIELD(ctecoltypmods, ctecoltypmods, ctecoltypmods); - WRITE_LIST_FIELD(ctecolcollations, ctecolcollations, ctecolcollations); + WRITE_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, sourcetype, sourcetype, sourcetype); + WRITE_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, targettype, targettype, targettype); + WRITE_SPECIFIC_NODE_PTR_FIELD(ObjectWithArgs, object_with_args, func, func, func); + WRITE_ENUM_FIELD(CoercionContext, context, context, context); + WRITE_BOOL_FIELD(inout, inout, inout); } static void -_outMergeWhenClause(OUT_TYPE(MergeWhenClause, MergeWhenClause) out, const MergeWhenClause *node) +_outCreateTransformStmt(OUT_TYPE(CreateTransformStmt, CreateTransformStmt) out, const CreateTransformStmt *node) { - WRITE_BOOL_FIELD(matched, matched, matched); - WRITE_ENUM_FIELD(CmdType, command_type, commandType, commandType); - WRITE_ENUM_FIELD(OverridingKind, override, override, override); - WRITE_NODE_PTR_FIELD(condition, condition, condition); - WRITE_LIST_FIELD(target_list, targetList, targetList); - WRITE_LIST_FIELD(values, values, values); + WRITE_BOOL_FIELD(replace, replace, replace); + WRITE_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, type_name, type_name, type_name); + WRITE_STRING_FIELD(lang, lang, lang); + WRITE_SPECIFIC_NODE_PTR_FIELD(ObjectWithArgs, object_with_args, fromsql, fromsql, fromsql); + WRITE_SPECIFIC_NODE_PTR_FIELD(ObjectWithArgs, object_with_args, tosql, tosql, tosql); } static void -_outRoleSpec(OUT_TYPE(RoleSpec, RoleSpec) out, const RoleSpec *node) +_outPrepareStmt(OUT_TYPE(PrepareStmt, PrepareStmt) out, const PrepareStmt *node) { - WRITE_ENUM_FIELD(RoleSpecType, roletype, roletype, roletype); - WRITE_STRING_FIELD(rolename, rolename, rolename); - WRITE_INT_FIELD(location, location, location); + WRITE_STRING_FIELD(name, name, name); + WRITE_LIST_FIELD(argtypes, argtypes, argtypes); + WRITE_NODE_PTR_FIELD(query, query, query); } static void -_outTriggerTransition(OUT_TYPE(TriggerTransition, TriggerTransition) out, const TriggerTransition *node) +_outExecuteStmt(OUT_TYPE(ExecuteStmt, ExecuteStmt) out, const ExecuteStmt *node) { WRITE_STRING_FIELD(name, name, name); - WRITE_BOOL_FIELD(is_new, isNew, isNew); - WRITE_BOOL_FIELD(is_table, isTable, isTable); + WRITE_LIST_FIELD(params, params, params); } static void -_outPartitionElem(OUT_TYPE(PartitionElem, PartitionElem) out, const PartitionElem *node) +_outDeallocateStmt(OUT_TYPE(DeallocateStmt, DeallocateStmt) out, const DeallocateStmt *node) { WRITE_STRING_FIELD(name, name, name); - WRITE_NODE_PTR_FIELD(expr, expr, expr); - WRITE_LIST_FIELD(collation, collation, collation); - WRITE_LIST_FIELD(opclass, opclass, opclass); - WRITE_INT_FIELD(location, location, location); } static void -_outPartitionSpec(OUT_TYPE(PartitionSpec, PartitionSpec) out, const PartitionSpec *node) +_outDropOwnedStmt(OUT_TYPE(DropOwnedStmt, DropOwnedStmt) out, const DropOwnedStmt *node) { - WRITE_STRING_FIELD(strategy, strategy, strategy); - WRITE_LIST_FIELD(part_params, partParams, partParams); - WRITE_INT_FIELD(location, location, location); + WRITE_LIST_FIELD(roles, roles, roles); + WRITE_ENUM_FIELD(DropBehavior, behavior, behavior, behavior); } static void -_outPartitionBoundSpec(OUT_TYPE(PartitionBoundSpec, PartitionBoundSpec) out, const PartitionBoundSpec *node) +_outReassignOwnedStmt(OUT_TYPE(ReassignOwnedStmt, ReassignOwnedStmt) out, const ReassignOwnedStmt *node) { - WRITE_CHAR_FIELD(strategy, strategy, strategy); - WRITE_BOOL_FIELD(is_default, is_default, is_default); - WRITE_INT_FIELD(modulus, modulus, modulus); - WRITE_INT_FIELD(remainder, remainder, remainder); - WRITE_LIST_FIELD(listdatums, listdatums, listdatums); - WRITE_LIST_FIELD(lowerdatums, lowerdatums, lowerdatums); - WRITE_LIST_FIELD(upperdatums, upperdatums, upperdatums); - WRITE_INT_FIELD(location, location, location); + WRITE_LIST_FIELD(roles, roles, roles); + WRITE_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, newrole, newrole, newrole); } static void -_outPartitionRangeDatum(OUT_TYPE(PartitionRangeDatum, PartitionRangeDatum) out, const PartitionRangeDatum *node) +_outAlterTSDictionaryStmt(OUT_TYPE(AlterTSDictionaryStmt, AlterTSDictionaryStmt) out, const AlterTSDictionaryStmt *node) { - WRITE_ENUM_FIELD(PartitionRangeDatumKind, kind, kind, kind); - WRITE_NODE_PTR_FIELD(value, value, value); - WRITE_INT_FIELD(location, location, location); + WRITE_LIST_FIELD(dictname, dictname, dictname); + WRITE_LIST_FIELD(options, options, options); } static void -_outPartitionCmd(OUT_TYPE(PartitionCmd, PartitionCmd) out, const PartitionCmd *node) +_outAlterTSConfigurationStmt(OUT_TYPE(AlterTSConfigurationStmt, AlterTSConfigurationStmt) out, const AlterTSConfigurationStmt *node) { - WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, name, name, name); - WRITE_SPECIFIC_NODE_PTR_FIELD(PartitionBoundSpec, partition_bound_spec, bound, bound, bound); - WRITE_BOOL_FIELD(concurrent, concurrent, concurrent); + WRITE_ENUM_FIELD(AlterTSConfigType, kind, kind, kind); + WRITE_LIST_FIELD(cfgname, cfgname, cfgname); + WRITE_LIST_FIELD(tokentype, tokentype, tokentype); + WRITE_LIST_FIELD(dicts, dicts, dicts); + WRITE_BOOL_FIELD(override, override, override); + WRITE_BOOL_FIELD(replace, replace, replace); + WRITE_BOOL_FIELD(missing_ok, missing_ok, missing_ok); } static void -_outVacuumRelation(OUT_TYPE(VacuumRelation, VacuumRelation) out, const VacuumRelation *node) +_outPublicationTable(OUT_TYPE(PublicationTable, PublicationTable) out, const PublicationTable *node) { WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); - WRITE_UINT_FIELD(oid, oid, oid); - WRITE_LIST_FIELD(va_cols, va_cols, va_cols); + WRITE_NODE_PTR_FIELD(where_clause, whereClause, whereClause); + WRITE_LIST_FIELD(columns, columns, columns); } static void @@ -2540,25 +2650,48 @@ _outPublicationObjSpec(OUT_TYPE(PublicationObjSpec, PublicationObjSpec) out, con } static void -_outPublicationTable(OUT_TYPE(PublicationTable, PublicationTable) out, const PublicationTable *node) +_outCreatePublicationStmt(OUT_TYPE(CreatePublicationStmt, CreatePublicationStmt) out, const CreatePublicationStmt *node) { - WRITE_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); - WRITE_NODE_PTR_FIELD(where_clause, whereClause, whereClause); - WRITE_LIST_FIELD(columns, columns, columns); + WRITE_STRING_FIELD(pubname, pubname, pubname); + WRITE_LIST_FIELD(options, options, options); + WRITE_LIST_FIELD(pubobjects, pubobjects, pubobjects); + WRITE_BOOL_FIELD(for_all_tables, for_all_tables, for_all_tables); } static void -_outInlineCodeBlock(OUT_TYPE(InlineCodeBlock, InlineCodeBlock) out, const InlineCodeBlock *node) +_outAlterPublicationStmt(OUT_TYPE(AlterPublicationStmt, AlterPublicationStmt) out, const AlterPublicationStmt *node) { - WRITE_STRING_FIELD(source_text, source_text, source_text); - WRITE_UINT_FIELD(lang_oid, langOid, langOid); - WRITE_BOOL_FIELD(lang_is_trusted, langIsTrusted, langIsTrusted); - WRITE_BOOL_FIELD(atomic, atomic, atomic); + WRITE_STRING_FIELD(pubname, pubname, pubname); + WRITE_LIST_FIELD(options, options, options); + WRITE_LIST_FIELD(pubobjects, pubobjects, pubobjects); + WRITE_BOOL_FIELD(for_all_tables, for_all_tables, for_all_tables); + WRITE_ENUM_FIELD(AlterPublicationAction, action, action, action); } static void -_outCallContext(OUT_TYPE(CallContext, CallContext) out, const CallContext *node) +_outCreateSubscriptionStmt(OUT_TYPE(CreateSubscriptionStmt, CreateSubscriptionStmt) out, const CreateSubscriptionStmt *node) { - WRITE_BOOL_FIELD(atomic, atomic, atomic); + WRITE_STRING_FIELD(subname, subname, subname); + WRITE_STRING_FIELD(conninfo, conninfo, conninfo); + WRITE_LIST_FIELD(publication, publication, publication); + WRITE_LIST_FIELD(options, options, options); +} + +static void +_outAlterSubscriptionStmt(OUT_TYPE(AlterSubscriptionStmt, AlterSubscriptionStmt) out, const AlterSubscriptionStmt *node) +{ + WRITE_ENUM_FIELD(AlterSubscriptionType, kind, kind, kind); + WRITE_STRING_FIELD(subname, subname, subname); + WRITE_STRING_FIELD(conninfo, conninfo, conninfo); + WRITE_LIST_FIELD(publication, publication, publication); + WRITE_LIST_FIELD(options, options, options); +} + +static void +_outDropSubscriptionStmt(OUT_TYPE(DropSubscriptionStmt, DropSubscriptionStmt) out, const DropSubscriptionStmt *node) +{ + WRITE_STRING_FIELD(subname, subname, subname); + WRITE_BOOL_FIELD(missing_ok, missing_ok, missing_ok); + WRITE_ENUM_FIELD(DropBehavior, behavior, behavior, behavior); } diff --git a/src/pg_query_readfuncs_conds.c b/src/pg_query_readfuncs_conds.c index a026b68e..dade57cc 100644 --- a/src/pg_query_readfuncs_conds.c +++ b/src/pg_query_readfuncs_conds.c @@ -3,6 +3,7 @@ READ_COND(Alias, Alias, alias, ALIAS, Alias, alias); READ_COND(RangeVar, RangeVar, range_var, RANGE_VAR, RangeVar, range_var); READ_COND(TableFunc, TableFunc, table_func, TABLE_FUNC, TableFunc, table_func); + READ_COND(IntoClause, IntoClause, into_clause, INTO_CLAUSE, IntoClause, into_clause); READ_COND(Var, Var, var, VAR, Var, var); READ_COND(Param, Param, param, PARAM, Param, param); READ_COND(Aggref, Aggref, aggref, AGGREF, Aggref, aggref); @@ -36,6 +37,11 @@ READ_COND(MinMaxExpr, MinMaxExpr, min_max_expr, MIN_MAX_EXPR, MinMaxExpr, min_max_expr); READ_COND(SQLValueFunction, SQLValueFunction, sqlvalue_function, SQLVALUE_FUNCTION, SQLValueFunction, sqlvalue_function); READ_COND(XmlExpr, XmlExpr, xml_expr, XML_EXPR, XmlExpr, xml_expr); + READ_COND(JsonFormat, JsonFormat, json_format, JSON_FORMAT, JsonFormat, json_format); + READ_COND(JsonReturning, JsonReturning, json_returning, JSON_RETURNING, JsonReturning, json_returning); + READ_COND(JsonValueExpr, JsonValueExpr, json_value_expr, JSON_VALUE_EXPR, JsonValueExpr, json_value_expr); + READ_COND(JsonConstructorExpr, JsonConstructorExpr, json_constructor_expr, JSON_CONSTRUCTOR_EXPR, JsonConstructorExpr, json_constructor_expr); + READ_COND(JsonIsPredicate, JsonIsPredicate, json_is_predicate, JSON_IS_PREDICATE, JsonIsPredicate, json_is_predicate); READ_COND(NullTest, NullTest, null_test, NULL_TEST, NullTest, null_test); READ_COND(BooleanTest, BooleanTest, boolean_test, BOOLEAN_TEST, BooleanTest, boolean_test); READ_COND(CoerceToDomain, CoerceToDomain, coerce_to_domain, COERCE_TO_DOMAIN, CoerceToDomain, coerce_to_domain); @@ -49,183 +55,191 @@ READ_COND(JoinExpr, JoinExpr, join_expr, JOIN_EXPR, JoinExpr, join_expr); READ_COND(FromExpr, FromExpr, from_expr, FROM_EXPR, FromExpr, from_expr); READ_COND(OnConflictExpr, OnConflictExpr, on_conflict_expr, ON_CONFLICT_EXPR, OnConflictExpr, on_conflict_expr); - READ_COND(IntoClause, IntoClause, into_clause, INTO_CLAUSE, IntoClause, into_clause); + READ_COND(Query, Query, query, QUERY, Query, query); + READ_COND(TypeName, TypeName, type_name, TYPE_NAME, TypeName, type_name); + READ_COND(ColumnRef, ColumnRef, column_ref, COLUMN_REF, ColumnRef, column_ref); + READ_COND(ParamRef, ParamRef, param_ref, PARAM_REF, ParamRef, param_ref); + READ_COND(A_Expr, AExpr, a__expr, A_EXPR, A_Expr, a_expr); + READ_COND(TypeCast, TypeCast, type_cast, TYPE_CAST, TypeCast, type_cast); + READ_COND(CollateClause, CollateClause, collate_clause, COLLATE_CLAUSE, CollateClause, collate_clause); + READ_COND(RoleSpec, RoleSpec, role_spec, ROLE_SPEC, RoleSpec, role_spec); + READ_COND(FuncCall, FuncCall, func_call, FUNC_CALL, FuncCall, func_call); + READ_COND(A_Star, AStar, a__star, A_STAR, A_Star, a_star); + READ_COND(A_Indices, AIndices, a__indices, A_INDICES, A_Indices, a_indices); + READ_COND(A_Indirection, AIndirection, a__indirection, A_INDIRECTION, A_Indirection, a_indirection); + READ_COND(A_ArrayExpr, AArrayExpr, a__array_expr, A_ARRAY_EXPR, A_ArrayExpr, a_array_expr); + READ_COND(ResTarget, ResTarget, res_target, RES_TARGET, ResTarget, res_target); + READ_COND(MultiAssignRef, MultiAssignRef, multi_assign_ref, MULTI_ASSIGN_REF, MultiAssignRef, multi_assign_ref); + READ_COND(SortBy, SortBy, sort_by, SORT_BY, SortBy, sort_by); + READ_COND(WindowDef, WindowDef, window_def, WINDOW_DEF, WindowDef, window_def); + READ_COND(RangeSubselect, RangeSubselect, range_subselect, RANGE_SUBSELECT, RangeSubselect, range_subselect); + READ_COND(RangeFunction, RangeFunction, range_function, RANGE_FUNCTION, RangeFunction, range_function); + READ_COND(RangeTableFunc, RangeTableFunc, range_table_func, RANGE_TABLE_FUNC, RangeTableFunc, range_table_func); + READ_COND(RangeTableFuncCol, RangeTableFuncCol, range_table_func_col, RANGE_TABLE_FUNC_COL, RangeTableFuncCol, range_table_func_col); + READ_COND(RangeTableSample, RangeTableSample, range_table_sample, RANGE_TABLE_SAMPLE, RangeTableSample, range_table_sample); + READ_COND(ColumnDef, ColumnDef, column_def, COLUMN_DEF, ColumnDef, column_def); + READ_COND(TableLikeClause, TableLikeClause, table_like_clause, TABLE_LIKE_CLAUSE, TableLikeClause, table_like_clause); + READ_COND(IndexElem, IndexElem, index_elem, INDEX_ELEM, IndexElem, index_elem); + READ_COND(DefElem, DefElem, def_elem, DEF_ELEM, DefElem, def_elem); + READ_COND(LockingClause, LockingClause, locking_clause, LOCKING_CLAUSE, LockingClause, locking_clause); + READ_COND(XmlSerialize, XmlSerialize, xml_serialize, XML_SERIALIZE, XmlSerialize, xml_serialize); + READ_COND(PartitionElem, PartitionElem, partition_elem, PARTITION_ELEM, PartitionElem, partition_elem); + READ_COND(PartitionSpec, PartitionSpec, partition_spec, PARTITION_SPEC, PartitionSpec, partition_spec); + READ_COND(PartitionBoundSpec, PartitionBoundSpec, partition_bound_spec, PARTITION_BOUND_SPEC, PartitionBoundSpec, partition_bound_spec); + READ_COND(PartitionRangeDatum, PartitionRangeDatum, partition_range_datum, PARTITION_RANGE_DATUM, PartitionRangeDatum, partition_range_datum); + READ_COND(PartitionCmd, PartitionCmd, partition_cmd, PARTITION_CMD, PartitionCmd, partition_cmd); + READ_COND(RangeTblEntry, RangeTblEntry, range_tbl_entry, RANGE_TBL_ENTRY, RangeTblEntry, range_tbl_entry); + READ_COND(RTEPermissionInfo, RTEPermissionInfo, rtepermission_info, RTEPERMISSION_INFO, RTEPermissionInfo, rtepermission_info); + READ_COND(RangeTblFunction, RangeTblFunction, range_tbl_function, RANGE_TBL_FUNCTION, RangeTblFunction, range_tbl_function); + READ_COND(TableSampleClause, TableSampleClause, table_sample_clause, TABLE_SAMPLE_CLAUSE, TableSampleClause, table_sample_clause); + READ_COND(WithCheckOption, WithCheckOption, with_check_option, WITH_CHECK_OPTION, WithCheckOption, with_check_option); + READ_COND(SortGroupClause, SortGroupClause, sort_group_clause, SORT_GROUP_CLAUSE, SortGroupClause, sort_group_clause); + READ_COND(GroupingSet, GroupingSet, grouping_set, GROUPING_SET, GroupingSet, grouping_set); + READ_COND(WindowClause, WindowClause, window_clause, WINDOW_CLAUSE, WindowClause, window_clause); + READ_COND(RowMarkClause, RowMarkClause, row_mark_clause, ROW_MARK_CLAUSE, RowMarkClause, row_mark_clause); + READ_COND(WithClause, WithClause, with_clause, WITH_CLAUSE, WithClause, with_clause); + READ_COND(InferClause, InferClause, infer_clause, INFER_CLAUSE, InferClause, infer_clause); + READ_COND(OnConflictClause, OnConflictClause, on_conflict_clause, ON_CONFLICT_CLAUSE, OnConflictClause, on_conflict_clause); + READ_COND(CTESearchClause, CTESearchClause, ctesearch_clause, CTESEARCH_CLAUSE, CTESearchClause, ctesearch_clause); + READ_COND(CTECycleClause, CTECycleClause, ctecycle_clause, CTECYCLE_CLAUSE, CTECycleClause, ctecycle_clause); + READ_COND(CommonTableExpr, CommonTableExpr, common_table_expr, COMMON_TABLE_EXPR, CommonTableExpr, common_table_expr); + READ_COND(MergeWhenClause, MergeWhenClause, merge_when_clause, MERGE_WHEN_CLAUSE, MergeWhenClause, merge_when_clause); READ_COND(MergeAction, MergeAction, merge_action, MERGE_ACTION, MergeAction, merge_action); + READ_COND(TriggerTransition, TriggerTransition, trigger_transition, TRIGGER_TRANSITION, TriggerTransition, trigger_transition); + READ_COND(JsonOutput, JsonOutput, json_output, JSON_OUTPUT, JsonOutput, json_output); + READ_COND(JsonKeyValue, JsonKeyValue, json_key_value, JSON_KEY_VALUE, JsonKeyValue, json_key_value); + READ_COND(JsonObjectConstructor, JsonObjectConstructor, json_object_constructor, JSON_OBJECT_CONSTRUCTOR, JsonObjectConstructor, json_object_constructor); + READ_COND(JsonArrayConstructor, JsonArrayConstructor, json_array_constructor, JSON_ARRAY_CONSTRUCTOR, JsonArrayConstructor, json_array_constructor); + READ_COND(JsonArrayQueryConstructor, JsonArrayQueryConstructor, json_array_query_constructor, JSON_ARRAY_QUERY_CONSTRUCTOR, JsonArrayQueryConstructor, json_array_query_constructor); + READ_COND(JsonAggConstructor, JsonAggConstructor, json_agg_constructor, JSON_AGG_CONSTRUCTOR, JsonAggConstructor, json_agg_constructor); + READ_COND(JsonObjectAgg, JsonObjectAgg, json_object_agg, JSON_OBJECT_AGG, JsonObjectAgg, json_object_agg); + READ_COND(JsonArrayAgg, JsonArrayAgg, json_array_agg, JSON_ARRAY_AGG, JsonArrayAgg, json_array_agg); READ_COND(RawStmt, RawStmt, raw_stmt, RAW_STMT, RawStmt, raw_stmt); - READ_COND(Query, Query, query, QUERY, Query, query); READ_COND(InsertStmt, InsertStmt, insert_stmt, INSERT_STMT, InsertStmt, insert_stmt); READ_COND(DeleteStmt, DeleteStmt, delete_stmt, DELETE_STMT, DeleteStmt, delete_stmt); READ_COND(UpdateStmt, UpdateStmt, update_stmt, UPDATE_STMT, UpdateStmt, update_stmt); READ_COND(MergeStmt, MergeStmt, merge_stmt, MERGE_STMT, MergeStmt, merge_stmt); READ_COND(SelectStmt, SelectStmt, select_stmt, SELECT_STMT, SelectStmt, select_stmt); + READ_COND(SetOperationStmt, SetOperationStmt, set_operation_stmt, SET_OPERATION_STMT, SetOperationStmt, set_operation_stmt); READ_COND(ReturnStmt, ReturnStmt, return_stmt, RETURN_STMT, ReturnStmt, return_stmt); READ_COND(PLAssignStmt, PLAssignStmt, plassign_stmt, PLASSIGN_STMT, PLAssignStmt, plassign_stmt); + READ_COND(CreateSchemaStmt, CreateSchemaStmt, create_schema_stmt, CREATE_SCHEMA_STMT, CreateSchemaStmt, create_schema_stmt); READ_COND(AlterTableStmt, AlterTableStmt, alter_table_stmt, ALTER_TABLE_STMT, AlterTableStmt, alter_table_stmt); + READ_COND(ReplicaIdentityStmt, ReplicaIdentityStmt, replica_identity_stmt, REPLICA_IDENTITY_STMT, ReplicaIdentityStmt, replica_identity_stmt); READ_COND(AlterTableCmd, AlterTableCmd, alter_table_cmd, ALTER_TABLE_CMD, AlterTableCmd, alter_table_cmd); + READ_COND(AlterCollationStmt, AlterCollationStmt, alter_collation_stmt, ALTER_COLLATION_STMT, AlterCollationStmt, alter_collation_stmt); READ_COND(AlterDomainStmt, AlterDomainStmt, alter_domain_stmt, ALTER_DOMAIN_STMT, AlterDomainStmt, alter_domain_stmt); - READ_COND(SetOperationStmt, SetOperationStmt, set_operation_stmt, SET_OPERATION_STMT, SetOperationStmt, set_operation_stmt); READ_COND(GrantStmt, GrantStmt, grant_stmt, GRANT_STMT, GrantStmt, grant_stmt); + READ_COND(ObjectWithArgs, ObjectWithArgs, object_with_args, OBJECT_WITH_ARGS, ObjectWithArgs, object_with_args); + READ_COND(AccessPriv, AccessPriv, access_priv, ACCESS_PRIV, AccessPriv, access_priv); READ_COND(GrantRoleStmt, GrantRoleStmt, grant_role_stmt, GRANT_ROLE_STMT, GrantRoleStmt, grant_role_stmt); READ_COND(AlterDefaultPrivilegesStmt, AlterDefaultPrivilegesStmt, alter_default_privileges_stmt, ALTER_DEFAULT_PRIVILEGES_STMT, AlterDefaultPrivilegesStmt, alter_default_privileges_stmt); - READ_COND(ClosePortalStmt, ClosePortalStmt, close_portal_stmt, CLOSE_PORTAL_STMT, ClosePortalStmt, close_portal_stmt); - READ_COND(ClusterStmt, ClusterStmt, cluster_stmt, CLUSTER_STMT, ClusterStmt, cluster_stmt); READ_COND(CopyStmt, CopyStmt, copy_stmt, COPY_STMT, CopyStmt, copy_stmt); + READ_COND(VariableSetStmt, VariableSetStmt, variable_set_stmt, VARIABLE_SET_STMT, VariableSetStmt, variable_set_stmt); + READ_COND(VariableShowStmt, VariableShowStmt, variable_show_stmt, VARIABLE_SHOW_STMT, VariableShowStmt, variable_show_stmt); READ_COND(CreateStmt, CreateStmt, create_stmt, CREATE_STMT, CreateStmt, create_stmt); + READ_COND(Constraint, Constraint, constraint, CONSTRAINT, Constraint, constraint); + READ_COND(CreateTableSpaceStmt, CreateTableSpaceStmt, create_table_space_stmt, CREATE_TABLE_SPACE_STMT, CreateTableSpaceStmt, create_table_space_stmt); + READ_COND(DropTableSpaceStmt, DropTableSpaceStmt, drop_table_space_stmt, DROP_TABLE_SPACE_STMT, DropTableSpaceStmt, drop_table_space_stmt); + READ_COND(AlterTableSpaceOptionsStmt, AlterTableSpaceOptionsStmt, alter_table_space_options_stmt, ALTER_TABLE_SPACE_OPTIONS_STMT, AlterTableSpaceOptionsStmt, alter_table_space_options_stmt); + READ_COND(AlterTableMoveAllStmt, AlterTableMoveAllStmt, alter_table_move_all_stmt, ALTER_TABLE_MOVE_ALL_STMT, AlterTableMoveAllStmt, alter_table_move_all_stmt); + READ_COND(CreateExtensionStmt, CreateExtensionStmt, create_extension_stmt, CREATE_EXTENSION_STMT, CreateExtensionStmt, create_extension_stmt); + READ_COND(AlterExtensionStmt, AlterExtensionStmt, alter_extension_stmt, ALTER_EXTENSION_STMT, AlterExtensionStmt, alter_extension_stmt); + READ_COND(AlterExtensionContentsStmt, AlterExtensionContentsStmt, alter_extension_contents_stmt, ALTER_EXTENSION_CONTENTS_STMT, AlterExtensionContentsStmt, alter_extension_contents_stmt); + READ_COND(CreateFdwStmt, CreateFdwStmt, create_fdw_stmt, CREATE_FDW_STMT, CreateFdwStmt, create_fdw_stmt); + READ_COND(AlterFdwStmt, AlterFdwStmt, alter_fdw_stmt, ALTER_FDW_STMT, AlterFdwStmt, alter_fdw_stmt); + READ_COND(CreateForeignServerStmt, CreateForeignServerStmt, create_foreign_server_stmt, CREATE_FOREIGN_SERVER_STMT, CreateForeignServerStmt, create_foreign_server_stmt); + READ_COND(AlterForeignServerStmt, AlterForeignServerStmt, alter_foreign_server_stmt, ALTER_FOREIGN_SERVER_STMT, AlterForeignServerStmt, alter_foreign_server_stmt); + READ_COND(CreateForeignTableStmt, CreateForeignTableStmt, create_foreign_table_stmt, CREATE_FOREIGN_TABLE_STMT, CreateForeignTableStmt, create_foreign_table_stmt); + READ_COND(CreateUserMappingStmt, CreateUserMappingStmt, create_user_mapping_stmt, CREATE_USER_MAPPING_STMT, CreateUserMappingStmt, create_user_mapping_stmt); + READ_COND(AlterUserMappingStmt, AlterUserMappingStmt, alter_user_mapping_stmt, ALTER_USER_MAPPING_STMT, AlterUserMappingStmt, alter_user_mapping_stmt); + READ_COND(DropUserMappingStmt, DropUserMappingStmt, drop_user_mapping_stmt, DROP_USER_MAPPING_STMT, DropUserMappingStmt, drop_user_mapping_stmt); + READ_COND(ImportForeignSchemaStmt, ImportForeignSchemaStmt, import_foreign_schema_stmt, IMPORT_FOREIGN_SCHEMA_STMT, ImportForeignSchemaStmt, import_foreign_schema_stmt); + READ_COND(CreatePolicyStmt, CreatePolicyStmt, create_policy_stmt, CREATE_POLICY_STMT, CreatePolicyStmt, create_policy_stmt); + READ_COND(AlterPolicyStmt, AlterPolicyStmt, alter_policy_stmt, ALTER_POLICY_STMT, AlterPolicyStmt, alter_policy_stmt); + READ_COND(CreateAmStmt, CreateAmStmt, create_am_stmt, CREATE_AM_STMT, CreateAmStmt, create_am_stmt); + READ_COND(CreateTrigStmt, CreateTrigStmt, create_trig_stmt, CREATE_TRIG_STMT, CreateTrigStmt, create_trig_stmt); + READ_COND(CreateEventTrigStmt, CreateEventTrigStmt, create_event_trig_stmt, CREATE_EVENT_TRIG_STMT, CreateEventTrigStmt, create_event_trig_stmt); + READ_COND(AlterEventTrigStmt, AlterEventTrigStmt, alter_event_trig_stmt, ALTER_EVENT_TRIG_STMT, AlterEventTrigStmt, alter_event_trig_stmt); + READ_COND(CreatePLangStmt, CreatePLangStmt, create_plang_stmt, CREATE_PLANG_STMT, CreatePLangStmt, create_plang_stmt); + READ_COND(CreateRoleStmt, CreateRoleStmt, create_role_stmt, CREATE_ROLE_STMT, CreateRoleStmt, create_role_stmt); + READ_COND(AlterRoleStmt, AlterRoleStmt, alter_role_stmt, ALTER_ROLE_STMT, AlterRoleStmt, alter_role_stmt); + READ_COND(AlterRoleSetStmt, AlterRoleSetStmt, alter_role_set_stmt, ALTER_ROLE_SET_STMT, AlterRoleSetStmt, alter_role_set_stmt); + READ_COND(DropRoleStmt, DropRoleStmt, drop_role_stmt, DROP_ROLE_STMT, DropRoleStmt, drop_role_stmt); + READ_COND(CreateSeqStmt, CreateSeqStmt, create_seq_stmt, CREATE_SEQ_STMT, CreateSeqStmt, create_seq_stmt); + READ_COND(AlterSeqStmt, AlterSeqStmt, alter_seq_stmt, ALTER_SEQ_STMT, AlterSeqStmt, alter_seq_stmt); READ_COND(DefineStmt, DefineStmt, define_stmt, DEFINE_STMT, DefineStmt, define_stmt); + READ_COND(CreateDomainStmt, CreateDomainStmt, create_domain_stmt, CREATE_DOMAIN_STMT, CreateDomainStmt, create_domain_stmt); + READ_COND(CreateOpClassStmt, CreateOpClassStmt, create_op_class_stmt, CREATE_OP_CLASS_STMT, CreateOpClassStmt, create_op_class_stmt); + READ_COND(CreateOpClassItem, CreateOpClassItem, create_op_class_item, CREATE_OP_CLASS_ITEM, CreateOpClassItem, create_op_class_item); + READ_COND(CreateOpFamilyStmt, CreateOpFamilyStmt, create_op_family_stmt, CREATE_OP_FAMILY_STMT, CreateOpFamilyStmt, create_op_family_stmt); + READ_COND(AlterOpFamilyStmt, AlterOpFamilyStmt, alter_op_family_stmt, ALTER_OP_FAMILY_STMT, AlterOpFamilyStmt, alter_op_family_stmt); READ_COND(DropStmt, DropStmt, drop_stmt, DROP_STMT, DropStmt, drop_stmt); READ_COND(TruncateStmt, TruncateStmt, truncate_stmt, TRUNCATE_STMT, TruncateStmt, truncate_stmt); READ_COND(CommentStmt, CommentStmt, comment_stmt, COMMENT_STMT, CommentStmt, comment_stmt); + READ_COND(SecLabelStmt, SecLabelStmt, sec_label_stmt, SEC_LABEL_STMT, SecLabelStmt, sec_label_stmt); + READ_COND(DeclareCursorStmt, DeclareCursorStmt, declare_cursor_stmt, DECLARE_CURSOR_STMT, DeclareCursorStmt, declare_cursor_stmt); + READ_COND(ClosePortalStmt, ClosePortalStmt, close_portal_stmt, CLOSE_PORTAL_STMT, ClosePortalStmt, close_portal_stmt); READ_COND(FetchStmt, FetchStmt, fetch_stmt, FETCH_STMT, FetchStmt, fetch_stmt); READ_COND(IndexStmt, IndexStmt, index_stmt, INDEX_STMT, IndexStmt, index_stmt); + READ_COND(CreateStatsStmt, CreateStatsStmt, create_stats_stmt, CREATE_STATS_STMT, CreateStatsStmt, create_stats_stmt); + READ_COND(StatsElem, StatsElem, stats_elem, STATS_ELEM, StatsElem, stats_elem); + READ_COND(AlterStatsStmt, AlterStatsStmt, alter_stats_stmt, ALTER_STATS_STMT, AlterStatsStmt, alter_stats_stmt); READ_COND(CreateFunctionStmt, CreateFunctionStmt, create_function_stmt, CREATE_FUNCTION_STMT, CreateFunctionStmt, create_function_stmt); + READ_COND(FunctionParameter, FunctionParameter, function_parameter, FUNCTION_PARAMETER, FunctionParameter, function_parameter); READ_COND(AlterFunctionStmt, AlterFunctionStmt, alter_function_stmt, ALTER_FUNCTION_STMT, AlterFunctionStmt, alter_function_stmt); READ_COND(DoStmt, DoStmt, do_stmt, DO_STMT, DoStmt, do_stmt); + READ_COND(InlineCodeBlock, InlineCodeBlock, inline_code_block, INLINE_CODE_BLOCK, InlineCodeBlock, inline_code_block); + READ_COND(CallStmt, CallStmt, call_stmt, CALL_STMT, CallStmt, call_stmt); + READ_COND(CallContext, CallContext, call_context, CALL_CONTEXT, CallContext, call_context); READ_COND(RenameStmt, RenameStmt, rename_stmt, RENAME_STMT, RenameStmt, rename_stmt); + READ_COND(AlterObjectDependsStmt, AlterObjectDependsStmt, alter_object_depends_stmt, ALTER_OBJECT_DEPENDS_STMT, AlterObjectDependsStmt, alter_object_depends_stmt); + READ_COND(AlterObjectSchemaStmt, AlterObjectSchemaStmt, alter_object_schema_stmt, ALTER_OBJECT_SCHEMA_STMT, AlterObjectSchemaStmt, alter_object_schema_stmt); + READ_COND(AlterOwnerStmt, AlterOwnerStmt, alter_owner_stmt, ALTER_OWNER_STMT, AlterOwnerStmt, alter_owner_stmt); + READ_COND(AlterOperatorStmt, AlterOperatorStmt, alter_operator_stmt, ALTER_OPERATOR_STMT, AlterOperatorStmt, alter_operator_stmt); + READ_COND(AlterTypeStmt, AlterTypeStmt, alter_type_stmt, ALTER_TYPE_STMT, AlterTypeStmt, alter_type_stmt); READ_COND(RuleStmt, RuleStmt, rule_stmt, RULE_STMT, RuleStmt, rule_stmt); READ_COND(NotifyStmt, NotifyStmt, notify_stmt, NOTIFY_STMT, NotifyStmt, notify_stmt); READ_COND(ListenStmt, ListenStmt, listen_stmt, LISTEN_STMT, ListenStmt, listen_stmt); READ_COND(UnlistenStmt, UnlistenStmt, unlisten_stmt, UNLISTEN_STMT, UnlistenStmt, unlisten_stmt); READ_COND(TransactionStmt, TransactionStmt, transaction_stmt, TRANSACTION_STMT, TransactionStmt, transaction_stmt); + READ_COND(CompositeTypeStmt, CompositeTypeStmt, composite_type_stmt, COMPOSITE_TYPE_STMT, CompositeTypeStmt, composite_type_stmt); + READ_COND(CreateEnumStmt, CreateEnumStmt, create_enum_stmt, CREATE_ENUM_STMT, CreateEnumStmt, create_enum_stmt); + READ_COND(CreateRangeStmt, CreateRangeStmt, create_range_stmt, CREATE_RANGE_STMT, CreateRangeStmt, create_range_stmt); + READ_COND(AlterEnumStmt, AlterEnumStmt, alter_enum_stmt, ALTER_ENUM_STMT, AlterEnumStmt, alter_enum_stmt); READ_COND(ViewStmt, ViewStmt, view_stmt, VIEW_STMT, ViewStmt, view_stmt); READ_COND(LoadStmt, LoadStmt, load_stmt, LOAD_STMT, LoadStmt, load_stmt); - READ_COND(CreateDomainStmt, CreateDomainStmt, create_domain_stmt, CREATE_DOMAIN_STMT, CreateDomainStmt, create_domain_stmt); READ_COND(CreatedbStmt, CreatedbStmt, createdb_stmt, CREATEDB_STMT, CreatedbStmt, createdb_stmt); + READ_COND(AlterDatabaseStmt, AlterDatabaseStmt, alter_database_stmt, ALTER_DATABASE_STMT, AlterDatabaseStmt, alter_database_stmt); + READ_COND(AlterDatabaseRefreshCollStmt, AlterDatabaseRefreshCollStmt, alter_database_refresh_coll_stmt, ALTER_DATABASE_REFRESH_COLL_STMT, AlterDatabaseRefreshCollStmt, alter_database_refresh_coll_stmt); + READ_COND(AlterDatabaseSetStmt, AlterDatabaseSetStmt, alter_database_set_stmt, ALTER_DATABASE_SET_STMT, AlterDatabaseSetStmt, alter_database_set_stmt); READ_COND(DropdbStmt, DropdbStmt, dropdb_stmt, DROPDB_STMT, DropdbStmt, dropdb_stmt); + READ_COND(AlterSystemStmt, AlterSystemStmt, alter_system_stmt, ALTER_SYSTEM_STMT, AlterSystemStmt, alter_system_stmt); + READ_COND(ClusterStmt, ClusterStmt, cluster_stmt, CLUSTER_STMT, ClusterStmt, cluster_stmt); READ_COND(VacuumStmt, VacuumStmt, vacuum_stmt, VACUUM_STMT, VacuumStmt, vacuum_stmt); + READ_COND(VacuumRelation, VacuumRelation, vacuum_relation, VACUUM_RELATION, VacuumRelation, vacuum_relation); READ_COND(ExplainStmt, ExplainStmt, explain_stmt, EXPLAIN_STMT, ExplainStmt, explain_stmt); READ_COND(CreateTableAsStmt, CreateTableAsStmt, create_table_as_stmt, CREATE_TABLE_AS_STMT, CreateTableAsStmt, create_table_as_stmt); - READ_COND(CreateSeqStmt, CreateSeqStmt, create_seq_stmt, CREATE_SEQ_STMT, CreateSeqStmt, create_seq_stmt); - READ_COND(AlterSeqStmt, AlterSeqStmt, alter_seq_stmt, ALTER_SEQ_STMT, AlterSeqStmt, alter_seq_stmt); - READ_COND(VariableSetStmt, VariableSetStmt, variable_set_stmt, VARIABLE_SET_STMT, VariableSetStmt, variable_set_stmt); - READ_COND(VariableShowStmt, VariableShowStmt, variable_show_stmt, VARIABLE_SHOW_STMT, VariableShowStmt, variable_show_stmt); + READ_COND(RefreshMatViewStmt, RefreshMatViewStmt, refresh_mat_view_stmt, REFRESH_MAT_VIEW_STMT, RefreshMatViewStmt, refresh_mat_view_stmt); + READ_COND(CheckPointStmt, CheckPointStmt, check_point_stmt, CHECK_POINT_STMT, CheckPointStmt, check_point_stmt); READ_COND(DiscardStmt, DiscardStmt, discard_stmt, DISCARD_STMT, DiscardStmt, discard_stmt); - READ_COND(CreateTrigStmt, CreateTrigStmt, create_trig_stmt, CREATE_TRIG_STMT, CreateTrigStmt, create_trig_stmt); - READ_COND(CreatePLangStmt, CreatePLangStmt, create_plang_stmt, CREATE_PLANG_STMT, CreatePLangStmt, create_plang_stmt); - READ_COND(CreateRoleStmt, CreateRoleStmt, create_role_stmt, CREATE_ROLE_STMT, CreateRoleStmt, create_role_stmt); - READ_COND(AlterRoleStmt, AlterRoleStmt, alter_role_stmt, ALTER_ROLE_STMT, AlterRoleStmt, alter_role_stmt); - READ_COND(DropRoleStmt, DropRoleStmt, drop_role_stmt, DROP_ROLE_STMT, DropRoleStmt, drop_role_stmt); READ_COND(LockStmt, LockStmt, lock_stmt, LOCK_STMT, LockStmt, lock_stmt); READ_COND(ConstraintsSetStmt, ConstraintsSetStmt, constraints_set_stmt, CONSTRAINTS_SET_STMT, ConstraintsSetStmt, constraints_set_stmt); READ_COND(ReindexStmt, ReindexStmt, reindex_stmt, REINDEX_STMT, ReindexStmt, reindex_stmt); - READ_COND(CheckPointStmt, CheckPointStmt, check_point_stmt, CHECK_POINT_STMT, CheckPointStmt, check_point_stmt); - READ_COND(CreateSchemaStmt, CreateSchemaStmt, create_schema_stmt, CREATE_SCHEMA_STMT, CreateSchemaStmt, create_schema_stmt); - READ_COND(AlterDatabaseStmt, AlterDatabaseStmt, alter_database_stmt, ALTER_DATABASE_STMT, AlterDatabaseStmt, alter_database_stmt); - READ_COND(AlterDatabaseRefreshCollStmt, AlterDatabaseRefreshCollStmt, alter_database_refresh_coll_stmt, ALTER_DATABASE_REFRESH_COLL_STMT, AlterDatabaseRefreshCollStmt, alter_database_refresh_coll_stmt); - READ_COND(AlterDatabaseSetStmt, AlterDatabaseSetStmt, alter_database_set_stmt, ALTER_DATABASE_SET_STMT, AlterDatabaseSetStmt, alter_database_set_stmt); - READ_COND(AlterRoleSetStmt, AlterRoleSetStmt, alter_role_set_stmt, ALTER_ROLE_SET_STMT, AlterRoleSetStmt, alter_role_set_stmt); READ_COND(CreateConversionStmt, CreateConversionStmt, create_conversion_stmt, CREATE_CONVERSION_STMT, CreateConversionStmt, create_conversion_stmt); READ_COND(CreateCastStmt, CreateCastStmt, create_cast_stmt, CREATE_CAST_STMT, CreateCastStmt, create_cast_stmt); - READ_COND(CreateOpClassStmt, CreateOpClassStmt, create_op_class_stmt, CREATE_OP_CLASS_STMT, CreateOpClassStmt, create_op_class_stmt); - READ_COND(CreateOpFamilyStmt, CreateOpFamilyStmt, create_op_family_stmt, CREATE_OP_FAMILY_STMT, CreateOpFamilyStmt, create_op_family_stmt); - READ_COND(AlterOpFamilyStmt, AlterOpFamilyStmt, alter_op_family_stmt, ALTER_OP_FAMILY_STMT, AlterOpFamilyStmt, alter_op_family_stmt); + READ_COND(CreateTransformStmt, CreateTransformStmt, create_transform_stmt, CREATE_TRANSFORM_STMT, CreateTransformStmt, create_transform_stmt); READ_COND(PrepareStmt, PrepareStmt, prepare_stmt, PREPARE_STMT, PrepareStmt, prepare_stmt); READ_COND(ExecuteStmt, ExecuteStmt, execute_stmt, EXECUTE_STMT, ExecuteStmt, execute_stmt); READ_COND(DeallocateStmt, DeallocateStmt, deallocate_stmt, DEALLOCATE_STMT, DeallocateStmt, deallocate_stmt); - READ_COND(DeclareCursorStmt, DeclareCursorStmt, declare_cursor_stmt, DECLARE_CURSOR_STMT, DeclareCursorStmt, declare_cursor_stmt); - READ_COND(CreateTableSpaceStmt, CreateTableSpaceStmt, create_table_space_stmt, CREATE_TABLE_SPACE_STMT, CreateTableSpaceStmt, create_table_space_stmt); - READ_COND(DropTableSpaceStmt, DropTableSpaceStmt, drop_table_space_stmt, DROP_TABLE_SPACE_STMT, DropTableSpaceStmt, drop_table_space_stmt); - READ_COND(AlterObjectDependsStmt, AlterObjectDependsStmt, alter_object_depends_stmt, ALTER_OBJECT_DEPENDS_STMT, AlterObjectDependsStmt, alter_object_depends_stmt); - READ_COND(AlterObjectSchemaStmt, AlterObjectSchemaStmt, alter_object_schema_stmt, ALTER_OBJECT_SCHEMA_STMT, AlterObjectSchemaStmt, alter_object_schema_stmt); - READ_COND(AlterOwnerStmt, AlterOwnerStmt, alter_owner_stmt, ALTER_OWNER_STMT, AlterOwnerStmt, alter_owner_stmt); - READ_COND(AlterOperatorStmt, AlterOperatorStmt, alter_operator_stmt, ALTER_OPERATOR_STMT, AlterOperatorStmt, alter_operator_stmt); - READ_COND(AlterTypeStmt, AlterTypeStmt, alter_type_stmt, ALTER_TYPE_STMT, AlterTypeStmt, alter_type_stmt); READ_COND(DropOwnedStmt, DropOwnedStmt, drop_owned_stmt, DROP_OWNED_STMT, DropOwnedStmt, drop_owned_stmt); READ_COND(ReassignOwnedStmt, ReassignOwnedStmt, reassign_owned_stmt, REASSIGN_OWNED_STMT, ReassignOwnedStmt, reassign_owned_stmt); - READ_COND(CompositeTypeStmt, CompositeTypeStmt, composite_type_stmt, COMPOSITE_TYPE_STMT, CompositeTypeStmt, composite_type_stmt); - READ_COND(CreateEnumStmt, CreateEnumStmt, create_enum_stmt, CREATE_ENUM_STMT, CreateEnumStmt, create_enum_stmt); - READ_COND(CreateRangeStmt, CreateRangeStmt, create_range_stmt, CREATE_RANGE_STMT, CreateRangeStmt, create_range_stmt); - READ_COND(AlterEnumStmt, AlterEnumStmt, alter_enum_stmt, ALTER_ENUM_STMT, AlterEnumStmt, alter_enum_stmt); READ_COND(AlterTSDictionaryStmt, AlterTSDictionaryStmt, alter_tsdictionary_stmt, ALTER_TSDICTIONARY_STMT, AlterTSDictionaryStmt, alter_tsdictionary_stmt); READ_COND(AlterTSConfigurationStmt, AlterTSConfigurationStmt, alter_tsconfiguration_stmt, ALTER_TSCONFIGURATION_STMT, AlterTSConfigurationStmt, alter_tsconfiguration_stmt); - READ_COND(CreateFdwStmt, CreateFdwStmt, create_fdw_stmt, CREATE_FDW_STMT, CreateFdwStmt, create_fdw_stmt); - READ_COND(AlterFdwStmt, AlterFdwStmt, alter_fdw_stmt, ALTER_FDW_STMT, AlterFdwStmt, alter_fdw_stmt); - READ_COND(CreateForeignServerStmt, CreateForeignServerStmt, create_foreign_server_stmt, CREATE_FOREIGN_SERVER_STMT, CreateForeignServerStmt, create_foreign_server_stmt); - READ_COND(AlterForeignServerStmt, AlterForeignServerStmt, alter_foreign_server_stmt, ALTER_FOREIGN_SERVER_STMT, AlterForeignServerStmt, alter_foreign_server_stmt); - READ_COND(CreateUserMappingStmt, CreateUserMappingStmt, create_user_mapping_stmt, CREATE_USER_MAPPING_STMT, CreateUserMappingStmt, create_user_mapping_stmt); - READ_COND(AlterUserMappingStmt, AlterUserMappingStmt, alter_user_mapping_stmt, ALTER_USER_MAPPING_STMT, AlterUserMappingStmt, alter_user_mapping_stmt); - READ_COND(DropUserMappingStmt, DropUserMappingStmt, drop_user_mapping_stmt, DROP_USER_MAPPING_STMT, DropUserMappingStmt, drop_user_mapping_stmt); - READ_COND(AlterTableSpaceOptionsStmt, AlterTableSpaceOptionsStmt, alter_table_space_options_stmt, ALTER_TABLE_SPACE_OPTIONS_STMT, AlterTableSpaceOptionsStmt, alter_table_space_options_stmt); - READ_COND(AlterTableMoveAllStmt, AlterTableMoveAllStmt, alter_table_move_all_stmt, ALTER_TABLE_MOVE_ALL_STMT, AlterTableMoveAllStmt, alter_table_move_all_stmt); - READ_COND(SecLabelStmt, SecLabelStmt, sec_label_stmt, SEC_LABEL_STMT, SecLabelStmt, sec_label_stmt); - READ_COND(CreateForeignTableStmt, CreateForeignTableStmt, create_foreign_table_stmt, CREATE_FOREIGN_TABLE_STMT, CreateForeignTableStmt, create_foreign_table_stmt); - READ_COND(ImportForeignSchemaStmt, ImportForeignSchemaStmt, import_foreign_schema_stmt, IMPORT_FOREIGN_SCHEMA_STMT, ImportForeignSchemaStmt, import_foreign_schema_stmt); - READ_COND(CreateExtensionStmt, CreateExtensionStmt, create_extension_stmt, CREATE_EXTENSION_STMT, CreateExtensionStmt, create_extension_stmt); - READ_COND(AlterExtensionStmt, AlterExtensionStmt, alter_extension_stmt, ALTER_EXTENSION_STMT, AlterExtensionStmt, alter_extension_stmt); - READ_COND(AlterExtensionContentsStmt, AlterExtensionContentsStmt, alter_extension_contents_stmt, ALTER_EXTENSION_CONTENTS_STMT, AlterExtensionContentsStmt, alter_extension_contents_stmt); - READ_COND(CreateEventTrigStmt, CreateEventTrigStmt, create_event_trig_stmt, CREATE_EVENT_TRIG_STMT, CreateEventTrigStmt, create_event_trig_stmt); - READ_COND(AlterEventTrigStmt, AlterEventTrigStmt, alter_event_trig_stmt, ALTER_EVENT_TRIG_STMT, AlterEventTrigStmt, alter_event_trig_stmt); - READ_COND(RefreshMatViewStmt, RefreshMatViewStmt, refresh_mat_view_stmt, REFRESH_MAT_VIEW_STMT, RefreshMatViewStmt, refresh_mat_view_stmt); - READ_COND(ReplicaIdentityStmt, ReplicaIdentityStmt, replica_identity_stmt, REPLICA_IDENTITY_STMT, ReplicaIdentityStmt, replica_identity_stmt); - READ_COND(AlterSystemStmt, AlterSystemStmt, alter_system_stmt, ALTER_SYSTEM_STMT, AlterSystemStmt, alter_system_stmt); - READ_COND(CreatePolicyStmt, CreatePolicyStmt, create_policy_stmt, CREATE_POLICY_STMT, CreatePolicyStmt, create_policy_stmt); - READ_COND(AlterPolicyStmt, AlterPolicyStmt, alter_policy_stmt, ALTER_POLICY_STMT, AlterPolicyStmt, alter_policy_stmt); - READ_COND(CreateTransformStmt, CreateTransformStmt, create_transform_stmt, CREATE_TRANSFORM_STMT, CreateTransformStmt, create_transform_stmt); - READ_COND(CreateAmStmt, CreateAmStmt, create_am_stmt, CREATE_AM_STMT, CreateAmStmt, create_am_stmt); + READ_COND(PublicationTable, PublicationTable, publication_table, PUBLICATION_TABLE, PublicationTable, publication_table); + READ_COND(PublicationObjSpec, PublicationObjSpec, publication_obj_spec, PUBLICATION_OBJ_SPEC, PublicationObjSpec, publication_obj_spec); READ_COND(CreatePublicationStmt, CreatePublicationStmt, create_publication_stmt, CREATE_PUBLICATION_STMT, CreatePublicationStmt, create_publication_stmt); READ_COND(AlterPublicationStmt, AlterPublicationStmt, alter_publication_stmt, ALTER_PUBLICATION_STMT, AlterPublicationStmt, alter_publication_stmt); READ_COND(CreateSubscriptionStmt, CreateSubscriptionStmt, create_subscription_stmt, CREATE_SUBSCRIPTION_STMT, CreateSubscriptionStmt, create_subscription_stmt); READ_COND(AlterSubscriptionStmt, AlterSubscriptionStmt, alter_subscription_stmt, ALTER_SUBSCRIPTION_STMT, AlterSubscriptionStmt, alter_subscription_stmt); READ_COND(DropSubscriptionStmt, DropSubscriptionStmt, drop_subscription_stmt, DROP_SUBSCRIPTION_STMT, DropSubscriptionStmt, drop_subscription_stmt); - READ_COND(CreateStatsStmt, CreateStatsStmt, create_stats_stmt, CREATE_STATS_STMT, CreateStatsStmt, create_stats_stmt); - READ_COND(AlterCollationStmt, AlterCollationStmt, alter_collation_stmt, ALTER_COLLATION_STMT, AlterCollationStmt, alter_collation_stmt); - READ_COND(CallStmt, CallStmt, call_stmt, CALL_STMT, CallStmt, call_stmt); - READ_COND(AlterStatsStmt, AlterStatsStmt, alter_stats_stmt, ALTER_STATS_STMT, AlterStatsStmt, alter_stats_stmt); - READ_COND(A_Expr, AExpr, a__expr, A_EXPR, A_Expr, a_expr); - READ_COND(ColumnRef, ColumnRef, column_ref, COLUMN_REF, ColumnRef, column_ref); - READ_COND(ParamRef, ParamRef, param_ref, PARAM_REF, ParamRef, param_ref); - READ_COND(FuncCall, FuncCall, func_call, FUNC_CALL, FuncCall, func_call); - READ_COND(A_Star, AStar, a__star, A_STAR, A_Star, a_star); - READ_COND(A_Indices, AIndices, a__indices, A_INDICES, A_Indices, a_indices); - READ_COND(A_Indirection, AIndirection, a__indirection, A_INDIRECTION, A_Indirection, a_indirection); - READ_COND(A_ArrayExpr, AArrayExpr, a__array_expr, A_ARRAY_EXPR, A_ArrayExpr, a_array_expr); - READ_COND(ResTarget, ResTarget, res_target, RES_TARGET, ResTarget, res_target); - READ_COND(MultiAssignRef, MultiAssignRef, multi_assign_ref, MULTI_ASSIGN_REF, MultiAssignRef, multi_assign_ref); - READ_COND(TypeCast, TypeCast, type_cast, TYPE_CAST, TypeCast, type_cast); - READ_COND(CollateClause, CollateClause, collate_clause, COLLATE_CLAUSE, CollateClause, collate_clause); - READ_COND(SortBy, SortBy, sort_by, SORT_BY, SortBy, sort_by); - READ_COND(WindowDef, WindowDef, window_def, WINDOW_DEF, WindowDef, window_def); - READ_COND(RangeSubselect, RangeSubselect, range_subselect, RANGE_SUBSELECT, RangeSubselect, range_subselect); - READ_COND(RangeFunction, RangeFunction, range_function, RANGE_FUNCTION, RangeFunction, range_function); - READ_COND(RangeTableSample, RangeTableSample, range_table_sample, RANGE_TABLE_SAMPLE, RangeTableSample, range_table_sample); - READ_COND(RangeTableFunc, RangeTableFunc, range_table_func, RANGE_TABLE_FUNC, RangeTableFunc, range_table_func); - READ_COND(RangeTableFuncCol, RangeTableFuncCol, range_table_func_col, RANGE_TABLE_FUNC_COL, RangeTableFuncCol, range_table_func_col); - READ_COND(TypeName, TypeName, type_name, TYPE_NAME, TypeName, type_name); - READ_COND(ColumnDef, ColumnDef, column_def, COLUMN_DEF, ColumnDef, column_def); - READ_COND(IndexElem, IndexElem, index_elem, INDEX_ELEM, IndexElem, index_elem); - READ_COND(StatsElem, StatsElem, stats_elem, STATS_ELEM, StatsElem, stats_elem); - READ_COND(Constraint, Constraint, constraint, CONSTRAINT, Constraint, constraint); - READ_COND(DefElem, DefElem, def_elem, DEF_ELEM, DefElem, def_elem); - READ_COND(RangeTblEntry, RangeTblEntry, range_tbl_entry, RANGE_TBL_ENTRY, RangeTblEntry, range_tbl_entry); - READ_COND(RangeTblFunction, RangeTblFunction, range_tbl_function, RANGE_TBL_FUNCTION, RangeTblFunction, range_tbl_function); - READ_COND(TableSampleClause, TableSampleClause, table_sample_clause, TABLE_SAMPLE_CLAUSE, TableSampleClause, table_sample_clause); - READ_COND(WithCheckOption, WithCheckOption, with_check_option, WITH_CHECK_OPTION, WithCheckOption, with_check_option); - READ_COND(SortGroupClause, SortGroupClause, sort_group_clause, SORT_GROUP_CLAUSE, SortGroupClause, sort_group_clause); - READ_COND(GroupingSet, GroupingSet, grouping_set, GROUPING_SET, GroupingSet, grouping_set); - READ_COND(WindowClause, WindowClause, window_clause, WINDOW_CLAUSE, WindowClause, window_clause); - READ_COND(ObjectWithArgs, ObjectWithArgs, object_with_args, OBJECT_WITH_ARGS, ObjectWithArgs, object_with_args); - READ_COND(AccessPriv, AccessPriv, access_priv, ACCESS_PRIV, AccessPriv, access_priv); - READ_COND(CreateOpClassItem, CreateOpClassItem, create_op_class_item, CREATE_OP_CLASS_ITEM, CreateOpClassItem, create_op_class_item); - READ_COND(TableLikeClause, TableLikeClause, table_like_clause, TABLE_LIKE_CLAUSE, TableLikeClause, table_like_clause); - READ_COND(FunctionParameter, FunctionParameter, function_parameter, FUNCTION_PARAMETER, FunctionParameter, function_parameter); - READ_COND(LockingClause, LockingClause, locking_clause, LOCKING_CLAUSE, LockingClause, locking_clause); - READ_COND(RowMarkClause, RowMarkClause, row_mark_clause, ROW_MARK_CLAUSE, RowMarkClause, row_mark_clause); - READ_COND(XmlSerialize, XmlSerialize, xml_serialize, XML_SERIALIZE, XmlSerialize, xml_serialize); - READ_COND(WithClause, WithClause, with_clause, WITH_CLAUSE, WithClause, with_clause); - READ_COND(InferClause, InferClause, infer_clause, INFER_CLAUSE, InferClause, infer_clause); - READ_COND(OnConflictClause, OnConflictClause, on_conflict_clause, ON_CONFLICT_CLAUSE, OnConflictClause, on_conflict_clause); - READ_COND(CTESearchClause, CTESearchClause, ctesearch_clause, CTESEARCH_CLAUSE, CTESearchClause, ctesearch_clause); - READ_COND(CTECycleClause, CTECycleClause, ctecycle_clause, CTECYCLE_CLAUSE, CTECycleClause, ctecycle_clause); - READ_COND(CommonTableExpr, CommonTableExpr, common_table_expr, COMMON_TABLE_EXPR, CommonTableExpr, common_table_expr); - READ_COND(MergeWhenClause, MergeWhenClause, merge_when_clause, MERGE_WHEN_CLAUSE, MergeWhenClause, merge_when_clause); - READ_COND(RoleSpec, RoleSpec, role_spec, ROLE_SPEC, RoleSpec, role_spec); - READ_COND(TriggerTransition, TriggerTransition, trigger_transition, TRIGGER_TRANSITION, TriggerTransition, trigger_transition); - READ_COND(PartitionElem, PartitionElem, partition_elem, PARTITION_ELEM, PartitionElem, partition_elem); - READ_COND(PartitionSpec, PartitionSpec, partition_spec, PARTITION_SPEC, PartitionSpec, partition_spec); - READ_COND(PartitionBoundSpec, PartitionBoundSpec, partition_bound_spec, PARTITION_BOUND_SPEC, PartitionBoundSpec, partition_bound_spec); - READ_COND(PartitionRangeDatum, PartitionRangeDatum, partition_range_datum, PARTITION_RANGE_DATUM, PartitionRangeDatum, partition_range_datum); - READ_COND(PartitionCmd, PartitionCmd, partition_cmd, PARTITION_CMD, PartitionCmd, partition_cmd); - READ_COND(VacuumRelation, VacuumRelation, vacuum_relation, VACUUM_RELATION, VacuumRelation, vacuum_relation); - READ_COND(PublicationObjSpec, PublicationObjSpec, publication_obj_spec, PUBLICATION_OBJ_SPEC, PublicationObjSpec, publication_obj_spec); - READ_COND(PublicationTable, PublicationTable, publication_table, PUBLICATION_TABLE, PublicationTable, publication_table); - READ_COND(InlineCodeBlock, InlineCodeBlock, inline_code_block, INLINE_CODE_BLOCK, InlineCodeBlock, inline_code_block); - READ_COND(CallContext, CallContext, call_context, CALL_CONTEXT, CallContext, call_context); diff --git a/src/pg_query_readfuncs_defs.c b/src/pg_query_readfuncs_defs.c index 7c30a4bf..3b163760 100644 --- a/src/pg_query_readfuncs_defs.c +++ b/src/pg_query_readfuncs_defs.c @@ -3,6 +3,7 @@ static Alias * _readAlias(OUT_TYPE(Alias, Alias) msg); static RangeVar * _readRangeVar(OUT_TYPE(RangeVar, RangeVar) msg); static TableFunc * _readTableFunc(OUT_TYPE(TableFunc, TableFunc) msg); +static IntoClause * _readIntoClause(OUT_TYPE(IntoClause, IntoClause) msg); static Var * _readVar(OUT_TYPE(Var, Var) msg); static Param * _readParam(OUT_TYPE(Param, Param) msg); static Aggref * _readAggref(OUT_TYPE(Aggref, Aggref) msg); @@ -36,6 +37,11 @@ static CoalesceExpr * _readCoalesceExpr(OUT_TYPE(CoalesceExpr, CoalesceExpr) msg static MinMaxExpr * _readMinMaxExpr(OUT_TYPE(MinMaxExpr, MinMaxExpr) msg); static SQLValueFunction * _readSQLValueFunction(OUT_TYPE(SQLValueFunction, SQLValueFunction) msg); static XmlExpr * _readXmlExpr(OUT_TYPE(XmlExpr, XmlExpr) msg); +static JsonFormat * _readJsonFormat(OUT_TYPE(JsonFormat, JsonFormat) msg); +static JsonReturning * _readJsonReturning(OUT_TYPE(JsonReturning, JsonReturning) msg); +static JsonValueExpr * _readJsonValueExpr(OUT_TYPE(JsonValueExpr, JsonValueExpr) msg); +static JsonConstructorExpr * _readJsonConstructorExpr(OUT_TYPE(JsonConstructorExpr, JsonConstructorExpr) msg); +static JsonIsPredicate * _readJsonIsPredicate(OUT_TYPE(JsonIsPredicate, JsonIsPredicate) msg); static NullTest * _readNullTest(OUT_TYPE(NullTest, NullTest) msg); static BooleanTest * _readBooleanTest(OUT_TYPE(BooleanTest, BooleanTest) msg); static CoerceToDomain * _readCoerceToDomain(OUT_TYPE(CoerceToDomain, CoerceToDomain) msg); @@ -49,186 +55,194 @@ static RangeTblRef * _readRangeTblRef(OUT_TYPE(RangeTblRef, RangeTblRef) msg); static JoinExpr * _readJoinExpr(OUT_TYPE(JoinExpr, JoinExpr) msg); static FromExpr * _readFromExpr(OUT_TYPE(FromExpr, FromExpr) msg); static OnConflictExpr * _readOnConflictExpr(OUT_TYPE(OnConflictExpr, OnConflictExpr) msg); -static IntoClause * _readIntoClause(OUT_TYPE(IntoClause, IntoClause) msg); +static Query * _readQuery(OUT_TYPE(Query, Query) msg); +static TypeName * _readTypeName(OUT_TYPE(TypeName, TypeName) msg); +static ColumnRef * _readColumnRef(OUT_TYPE(ColumnRef, ColumnRef) msg); +static ParamRef * _readParamRef(OUT_TYPE(ParamRef, ParamRef) msg); +static A_Expr * _readAExpr(OUT_TYPE(A_Expr, AExpr) msg); +static TypeCast * _readTypeCast(OUT_TYPE(TypeCast, TypeCast) msg); +static CollateClause * _readCollateClause(OUT_TYPE(CollateClause, CollateClause) msg); +static RoleSpec * _readRoleSpec(OUT_TYPE(RoleSpec, RoleSpec) msg); +static FuncCall * _readFuncCall(OUT_TYPE(FuncCall, FuncCall) msg); +static A_Star * _readAStar(OUT_TYPE(A_Star, AStar) msg); +static A_Indices * _readAIndices(OUT_TYPE(A_Indices, AIndices) msg); +static A_Indirection * _readAIndirection(OUT_TYPE(A_Indirection, AIndirection) msg); +static A_ArrayExpr * _readAArrayExpr(OUT_TYPE(A_ArrayExpr, AArrayExpr) msg); +static ResTarget * _readResTarget(OUT_TYPE(ResTarget, ResTarget) msg); +static MultiAssignRef * _readMultiAssignRef(OUT_TYPE(MultiAssignRef, MultiAssignRef) msg); +static SortBy * _readSortBy(OUT_TYPE(SortBy, SortBy) msg); +static WindowDef * _readWindowDef(OUT_TYPE(WindowDef, WindowDef) msg); +static RangeSubselect * _readRangeSubselect(OUT_TYPE(RangeSubselect, RangeSubselect) msg); +static RangeFunction * _readRangeFunction(OUT_TYPE(RangeFunction, RangeFunction) msg); +static RangeTableFunc * _readRangeTableFunc(OUT_TYPE(RangeTableFunc, RangeTableFunc) msg); +static RangeTableFuncCol * _readRangeTableFuncCol(OUT_TYPE(RangeTableFuncCol, RangeTableFuncCol) msg); +static RangeTableSample * _readRangeTableSample(OUT_TYPE(RangeTableSample, RangeTableSample) msg); +static ColumnDef * _readColumnDef(OUT_TYPE(ColumnDef, ColumnDef) msg); +static TableLikeClause * _readTableLikeClause(OUT_TYPE(TableLikeClause, TableLikeClause) msg); +static IndexElem * _readIndexElem(OUT_TYPE(IndexElem, IndexElem) msg); +static DefElem * _readDefElem(OUT_TYPE(DefElem, DefElem) msg); +static LockingClause * _readLockingClause(OUT_TYPE(LockingClause, LockingClause) msg); +static XmlSerialize * _readXmlSerialize(OUT_TYPE(XmlSerialize, XmlSerialize) msg); +static PartitionElem * _readPartitionElem(OUT_TYPE(PartitionElem, PartitionElem) msg); +static PartitionSpec * _readPartitionSpec(OUT_TYPE(PartitionSpec, PartitionSpec) msg); +static PartitionBoundSpec * _readPartitionBoundSpec(OUT_TYPE(PartitionBoundSpec, PartitionBoundSpec) msg); +static PartitionRangeDatum * _readPartitionRangeDatum(OUT_TYPE(PartitionRangeDatum, PartitionRangeDatum) msg); +static PartitionCmd * _readPartitionCmd(OUT_TYPE(PartitionCmd, PartitionCmd) msg); +static RangeTblEntry * _readRangeTblEntry(OUT_TYPE(RangeTblEntry, RangeTblEntry) msg); +static RTEPermissionInfo * _readRTEPermissionInfo(OUT_TYPE(RTEPermissionInfo, RTEPermissionInfo) msg); +static RangeTblFunction * _readRangeTblFunction(OUT_TYPE(RangeTblFunction, RangeTblFunction) msg); +static TableSampleClause * _readTableSampleClause(OUT_TYPE(TableSampleClause, TableSampleClause) msg); +static WithCheckOption * _readWithCheckOption(OUT_TYPE(WithCheckOption, WithCheckOption) msg); +static SortGroupClause * _readSortGroupClause(OUT_TYPE(SortGroupClause, SortGroupClause) msg); +static GroupingSet * _readGroupingSet(OUT_TYPE(GroupingSet, GroupingSet) msg); +static WindowClause * _readWindowClause(OUT_TYPE(WindowClause, WindowClause) msg); +static RowMarkClause * _readRowMarkClause(OUT_TYPE(RowMarkClause, RowMarkClause) msg); +static WithClause * _readWithClause(OUT_TYPE(WithClause, WithClause) msg); +static InferClause * _readInferClause(OUT_TYPE(InferClause, InferClause) msg); +static OnConflictClause * _readOnConflictClause(OUT_TYPE(OnConflictClause, OnConflictClause) msg); +static CTESearchClause * _readCTESearchClause(OUT_TYPE(CTESearchClause, CTESearchClause) msg); +static CTECycleClause * _readCTECycleClause(OUT_TYPE(CTECycleClause, CTECycleClause) msg); +static CommonTableExpr * _readCommonTableExpr(OUT_TYPE(CommonTableExpr, CommonTableExpr) msg); +static MergeWhenClause * _readMergeWhenClause(OUT_TYPE(MergeWhenClause, MergeWhenClause) msg); static MergeAction * _readMergeAction(OUT_TYPE(MergeAction, MergeAction) msg); +static TriggerTransition * _readTriggerTransition(OUT_TYPE(TriggerTransition, TriggerTransition) msg); +static JsonOutput * _readJsonOutput(OUT_TYPE(JsonOutput, JsonOutput) msg); +static JsonKeyValue * _readJsonKeyValue(OUT_TYPE(JsonKeyValue, JsonKeyValue) msg); +static JsonObjectConstructor * _readJsonObjectConstructor(OUT_TYPE(JsonObjectConstructor, JsonObjectConstructor) msg); +static JsonArrayConstructor * _readJsonArrayConstructor(OUT_TYPE(JsonArrayConstructor, JsonArrayConstructor) msg); +static JsonArrayQueryConstructor * _readJsonArrayQueryConstructor(OUT_TYPE(JsonArrayQueryConstructor, JsonArrayQueryConstructor) msg); +static JsonAggConstructor * _readJsonAggConstructor(OUT_TYPE(JsonAggConstructor, JsonAggConstructor) msg); +static JsonObjectAgg * _readJsonObjectAgg(OUT_TYPE(JsonObjectAgg, JsonObjectAgg) msg); +static JsonArrayAgg * _readJsonArrayAgg(OUT_TYPE(JsonArrayAgg, JsonArrayAgg) msg); static RawStmt * _readRawStmt(OUT_TYPE(RawStmt, RawStmt) msg); -static Query * _readQuery(OUT_TYPE(Query, Query) msg); static InsertStmt * _readInsertStmt(OUT_TYPE(InsertStmt, InsertStmt) msg); static DeleteStmt * _readDeleteStmt(OUT_TYPE(DeleteStmt, DeleteStmt) msg); static UpdateStmt * _readUpdateStmt(OUT_TYPE(UpdateStmt, UpdateStmt) msg); static MergeStmt * _readMergeStmt(OUT_TYPE(MergeStmt, MergeStmt) msg); static SelectStmt * _readSelectStmt(OUT_TYPE(SelectStmt, SelectStmt) msg); +static SetOperationStmt * _readSetOperationStmt(OUT_TYPE(SetOperationStmt, SetOperationStmt) msg); static ReturnStmt * _readReturnStmt(OUT_TYPE(ReturnStmt, ReturnStmt) msg); static PLAssignStmt * _readPLAssignStmt(OUT_TYPE(PLAssignStmt, PLAssignStmt) msg); +static CreateSchemaStmt * _readCreateSchemaStmt(OUT_TYPE(CreateSchemaStmt, CreateSchemaStmt) msg); static AlterTableStmt * _readAlterTableStmt(OUT_TYPE(AlterTableStmt, AlterTableStmt) msg); +static ReplicaIdentityStmt * _readReplicaIdentityStmt(OUT_TYPE(ReplicaIdentityStmt, ReplicaIdentityStmt) msg); static AlterTableCmd * _readAlterTableCmd(OUT_TYPE(AlterTableCmd, AlterTableCmd) msg); +static AlterCollationStmt * _readAlterCollationStmt(OUT_TYPE(AlterCollationStmt, AlterCollationStmt) msg); static AlterDomainStmt * _readAlterDomainStmt(OUT_TYPE(AlterDomainStmt, AlterDomainStmt) msg); -static SetOperationStmt * _readSetOperationStmt(OUT_TYPE(SetOperationStmt, SetOperationStmt) msg); static GrantStmt * _readGrantStmt(OUT_TYPE(GrantStmt, GrantStmt) msg); +static ObjectWithArgs * _readObjectWithArgs(OUT_TYPE(ObjectWithArgs, ObjectWithArgs) msg); +static AccessPriv * _readAccessPriv(OUT_TYPE(AccessPriv, AccessPriv) msg); static GrantRoleStmt * _readGrantRoleStmt(OUT_TYPE(GrantRoleStmt, GrantRoleStmt) msg); static AlterDefaultPrivilegesStmt * _readAlterDefaultPrivilegesStmt(OUT_TYPE(AlterDefaultPrivilegesStmt, AlterDefaultPrivilegesStmt) msg); -static ClosePortalStmt * _readClosePortalStmt(OUT_TYPE(ClosePortalStmt, ClosePortalStmt) msg); -static ClusterStmt * _readClusterStmt(OUT_TYPE(ClusterStmt, ClusterStmt) msg); static CopyStmt * _readCopyStmt(OUT_TYPE(CopyStmt, CopyStmt) msg); +static VariableSetStmt * _readVariableSetStmt(OUT_TYPE(VariableSetStmt, VariableSetStmt) msg); +static VariableShowStmt * _readVariableShowStmt(OUT_TYPE(VariableShowStmt, VariableShowStmt) msg); static CreateStmt * _readCreateStmt(OUT_TYPE(CreateStmt, CreateStmt) msg); +static Constraint * _readConstraint(OUT_TYPE(Constraint, Constraint) msg); +static CreateTableSpaceStmt * _readCreateTableSpaceStmt(OUT_TYPE(CreateTableSpaceStmt, CreateTableSpaceStmt) msg); +static DropTableSpaceStmt * _readDropTableSpaceStmt(OUT_TYPE(DropTableSpaceStmt, DropTableSpaceStmt) msg); +static AlterTableSpaceOptionsStmt * _readAlterTableSpaceOptionsStmt(OUT_TYPE(AlterTableSpaceOptionsStmt, AlterTableSpaceOptionsStmt) msg); +static AlterTableMoveAllStmt * _readAlterTableMoveAllStmt(OUT_TYPE(AlterTableMoveAllStmt, AlterTableMoveAllStmt) msg); +static CreateExtensionStmt * _readCreateExtensionStmt(OUT_TYPE(CreateExtensionStmt, CreateExtensionStmt) msg); +static AlterExtensionStmt * _readAlterExtensionStmt(OUT_TYPE(AlterExtensionStmt, AlterExtensionStmt) msg); +static AlterExtensionContentsStmt * _readAlterExtensionContentsStmt(OUT_TYPE(AlterExtensionContentsStmt, AlterExtensionContentsStmt) msg); +static CreateFdwStmt * _readCreateFdwStmt(OUT_TYPE(CreateFdwStmt, CreateFdwStmt) msg); +static AlterFdwStmt * _readAlterFdwStmt(OUT_TYPE(AlterFdwStmt, AlterFdwStmt) msg); +static CreateForeignServerStmt * _readCreateForeignServerStmt(OUT_TYPE(CreateForeignServerStmt, CreateForeignServerStmt) msg); +static AlterForeignServerStmt * _readAlterForeignServerStmt(OUT_TYPE(AlterForeignServerStmt, AlterForeignServerStmt) msg); +static CreateForeignTableStmt * _readCreateForeignTableStmt(OUT_TYPE(CreateForeignTableStmt, CreateForeignTableStmt) msg); +static CreateUserMappingStmt * _readCreateUserMappingStmt(OUT_TYPE(CreateUserMappingStmt, CreateUserMappingStmt) msg); +static AlterUserMappingStmt * _readAlterUserMappingStmt(OUT_TYPE(AlterUserMappingStmt, AlterUserMappingStmt) msg); +static DropUserMappingStmt * _readDropUserMappingStmt(OUT_TYPE(DropUserMappingStmt, DropUserMappingStmt) msg); +static ImportForeignSchemaStmt * _readImportForeignSchemaStmt(OUT_TYPE(ImportForeignSchemaStmt, ImportForeignSchemaStmt) msg); +static CreatePolicyStmt * _readCreatePolicyStmt(OUT_TYPE(CreatePolicyStmt, CreatePolicyStmt) msg); +static AlterPolicyStmt * _readAlterPolicyStmt(OUT_TYPE(AlterPolicyStmt, AlterPolicyStmt) msg); +static CreateAmStmt * _readCreateAmStmt(OUT_TYPE(CreateAmStmt, CreateAmStmt) msg); +static CreateTrigStmt * _readCreateTrigStmt(OUT_TYPE(CreateTrigStmt, CreateTrigStmt) msg); +static CreateEventTrigStmt * _readCreateEventTrigStmt(OUT_TYPE(CreateEventTrigStmt, CreateEventTrigStmt) msg); +static AlterEventTrigStmt * _readAlterEventTrigStmt(OUT_TYPE(AlterEventTrigStmt, AlterEventTrigStmt) msg); +static CreatePLangStmt * _readCreatePLangStmt(OUT_TYPE(CreatePLangStmt, CreatePLangStmt) msg); +static CreateRoleStmt * _readCreateRoleStmt(OUT_TYPE(CreateRoleStmt, CreateRoleStmt) msg); +static AlterRoleStmt * _readAlterRoleStmt(OUT_TYPE(AlterRoleStmt, AlterRoleStmt) msg); +static AlterRoleSetStmt * _readAlterRoleSetStmt(OUT_TYPE(AlterRoleSetStmt, AlterRoleSetStmt) msg); +static DropRoleStmt * _readDropRoleStmt(OUT_TYPE(DropRoleStmt, DropRoleStmt) msg); +static CreateSeqStmt * _readCreateSeqStmt(OUT_TYPE(CreateSeqStmt, CreateSeqStmt) msg); +static AlterSeqStmt * _readAlterSeqStmt(OUT_TYPE(AlterSeqStmt, AlterSeqStmt) msg); static DefineStmt * _readDefineStmt(OUT_TYPE(DefineStmt, DefineStmt) msg); +static CreateDomainStmt * _readCreateDomainStmt(OUT_TYPE(CreateDomainStmt, CreateDomainStmt) msg); +static CreateOpClassStmt * _readCreateOpClassStmt(OUT_TYPE(CreateOpClassStmt, CreateOpClassStmt) msg); +static CreateOpClassItem * _readCreateOpClassItem(OUT_TYPE(CreateOpClassItem, CreateOpClassItem) msg); +static CreateOpFamilyStmt * _readCreateOpFamilyStmt(OUT_TYPE(CreateOpFamilyStmt, CreateOpFamilyStmt) msg); +static AlterOpFamilyStmt * _readAlterOpFamilyStmt(OUT_TYPE(AlterOpFamilyStmt, AlterOpFamilyStmt) msg); static DropStmt * _readDropStmt(OUT_TYPE(DropStmt, DropStmt) msg); static TruncateStmt * _readTruncateStmt(OUT_TYPE(TruncateStmt, TruncateStmt) msg); static CommentStmt * _readCommentStmt(OUT_TYPE(CommentStmt, CommentStmt) msg); +static SecLabelStmt * _readSecLabelStmt(OUT_TYPE(SecLabelStmt, SecLabelStmt) msg); +static DeclareCursorStmt * _readDeclareCursorStmt(OUT_TYPE(DeclareCursorStmt, DeclareCursorStmt) msg); +static ClosePortalStmt * _readClosePortalStmt(OUT_TYPE(ClosePortalStmt, ClosePortalStmt) msg); static FetchStmt * _readFetchStmt(OUT_TYPE(FetchStmt, FetchStmt) msg); static IndexStmt * _readIndexStmt(OUT_TYPE(IndexStmt, IndexStmt) msg); +static CreateStatsStmt * _readCreateStatsStmt(OUT_TYPE(CreateStatsStmt, CreateStatsStmt) msg); +static StatsElem * _readStatsElem(OUT_TYPE(StatsElem, StatsElem) msg); +static AlterStatsStmt * _readAlterStatsStmt(OUT_TYPE(AlterStatsStmt, AlterStatsStmt) msg); static CreateFunctionStmt * _readCreateFunctionStmt(OUT_TYPE(CreateFunctionStmt, CreateFunctionStmt) msg); +static FunctionParameter * _readFunctionParameter(OUT_TYPE(FunctionParameter, FunctionParameter) msg); static AlterFunctionStmt * _readAlterFunctionStmt(OUT_TYPE(AlterFunctionStmt, AlterFunctionStmt) msg); static DoStmt * _readDoStmt(OUT_TYPE(DoStmt, DoStmt) msg); +static InlineCodeBlock * _readInlineCodeBlock(OUT_TYPE(InlineCodeBlock, InlineCodeBlock) msg); +static CallStmt * _readCallStmt(OUT_TYPE(CallStmt, CallStmt) msg); +static CallContext * _readCallContext(OUT_TYPE(CallContext, CallContext) msg); static RenameStmt * _readRenameStmt(OUT_TYPE(RenameStmt, RenameStmt) msg); +static AlterObjectDependsStmt * _readAlterObjectDependsStmt(OUT_TYPE(AlterObjectDependsStmt, AlterObjectDependsStmt) msg); +static AlterObjectSchemaStmt * _readAlterObjectSchemaStmt(OUT_TYPE(AlterObjectSchemaStmt, AlterObjectSchemaStmt) msg); +static AlterOwnerStmt * _readAlterOwnerStmt(OUT_TYPE(AlterOwnerStmt, AlterOwnerStmt) msg); +static AlterOperatorStmt * _readAlterOperatorStmt(OUT_TYPE(AlterOperatorStmt, AlterOperatorStmt) msg); +static AlterTypeStmt * _readAlterTypeStmt(OUT_TYPE(AlterTypeStmt, AlterTypeStmt) msg); static RuleStmt * _readRuleStmt(OUT_TYPE(RuleStmt, RuleStmt) msg); static NotifyStmt * _readNotifyStmt(OUT_TYPE(NotifyStmt, NotifyStmt) msg); static ListenStmt * _readListenStmt(OUT_TYPE(ListenStmt, ListenStmt) msg); static UnlistenStmt * _readUnlistenStmt(OUT_TYPE(UnlistenStmt, UnlistenStmt) msg); static TransactionStmt * _readTransactionStmt(OUT_TYPE(TransactionStmt, TransactionStmt) msg); +static CompositeTypeStmt * _readCompositeTypeStmt(OUT_TYPE(CompositeTypeStmt, CompositeTypeStmt) msg); +static CreateEnumStmt * _readCreateEnumStmt(OUT_TYPE(CreateEnumStmt, CreateEnumStmt) msg); +static CreateRangeStmt * _readCreateRangeStmt(OUT_TYPE(CreateRangeStmt, CreateRangeStmt) msg); +static AlterEnumStmt * _readAlterEnumStmt(OUT_TYPE(AlterEnumStmt, AlterEnumStmt) msg); static ViewStmt * _readViewStmt(OUT_TYPE(ViewStmt, ViewStmt) msg); static LoadStmt * _readLoadStmt(OUT_TYPE(LoadStmt, LoadStmt) msg); -static CreateDomainStmt * _readCreateDomainStmt(OUT_TYPE(CreateDomainStmt, CreateDomainStmt) msg); static CreatedbStmt * _readCreatedbStmt(OUT_TYPE(CreatedbStmt, CreatedbStmt) msg); +static AlterDatabaseStmt * _readAlterDatabaseStmt(OUT_TYPE(AlterDatabaseStmt, AlterDatabaseStmt) msg); +static AlterDatabaseRefreshCollStmt * _readAlterDatabaseRefreshCollStmt(OUT_TYPE(AlterDatabaseRefreshCollStmt, AlterDatabaseRefreshCollStmt) msg); +static AlterDatabaseSetStmt * _readAlterDatabaseSetStmt(OUT_TYPE(AlterDatabaseSetStmt, AlterDatabaseSetStmt) msg); static DropdbStmt * _readDropdbStmt(OUT_TYPE(DropdbStmt, DropdbStmt) msg); +static AlterSystemStmt * _readAlterSystemStmt(OUT_TYPE(AlterSystemStmt, AlterSystemStmt) msg); +static ClusterStmt * _readClusterStmt(OUT_TYPE(ClusterStmt, ClusterStmt) msg); static VacuumStmt * _readVacuumStmt(OUT_TYPE(VacuumStmt, VacuumStmt) msg); +static VacuumRelation * _readVacuumRelation(OUT_TYPE(VacuumRelation, VacuumRelation) msg); static ExplainStmt * _readExplainStmt(OUT_TYPE(ExplainStmt, ExplainStmt) msg); static CreateTableAsStmt * _readCreateTableAsStmt(OUT_TYPE(CreateTableAsStmt, CreateTableAsStmt) msg); -static CreateSeqStmt * _readCreateSeqStmt(OUT_TYPE(CreateSeqStmt, CreateSeqStmt) msg); -static AlterSeqStmt * _readAlterSeqStmt(OUT_TYPE(AlterSeqStmt, AlterSeqStmt) msg); -static VariableSetStmt * _readVariableSetStmt(OUT_TYPE(VariableSetStmt, VariableSetStmt) msg); -static VariableShowStmt * _readVariableShowStmt(OUT_TYPE(VariableShowStmt, VariableShowStmt) msg); +static RefreshMatViewStmt * _readRefreshMatViewStmt(OUT_TYPE(RefreshMatViewStmt, RefreshMatViewStmt) msg); +static CheckPointStmt * _readCheckPointStmt(OUT_TYPE(CheckPointStmt, CheckPointStmt) msg); static DiscardStmt * _readDiscardStmt(OUT_TYPE(DiscardStmt, DiscardStmt) msg); -static CreateTrigStmt * _readCreateTrigStmt(OUT_TYPE(CreateTrigStmt, CreateTrigStmt) msg); -static CreatePLangStmt * _readCreatePLangStmt(OUT_TYPE(CreatePLangStmt, CreatePLangStmt) msg); -static CreateRoleStmt * _readCreateRoleStmt(OUT_TYPE(CreateRoleStmt, CreateRoleStmt) msg); -static AlterRoleStmt * _readAlterRoleStmt(OUT_TYPE(AlterRoleStmt, AlterRoleStmt) msg); -static DropRoleStmt * _readDropRoleStmt(OUT_TYPE(DropRoleStmt, DropRoleStmt) msg); static LockStmt * _readLockStmt(OUT_TYPE(LockStmt, LockStmt) msg); static ConstraintsSetStmt * _readConstraintsSetStmt(OUT_TYPE(ConstraintsSetStmt, ConstraintsSetStmt) msg); static ReindexStmt * _readReindexStmt(OUT_TYPE(ReindexStmt, ReindexStmt) msg); -static CheckPointStmt * _readCheckPointStmt(OUT_TYPE(CheckPointStmt, CheckPointStmt) msg); -static CreateSchemaStmt * _readCreateSchemaStmt(OUT_TYPE(CreateSchemaStmt, CreateSchemaStmt) msg); -static AlterDatabaseStmt * _readAlterDatabaseStmt(OUT_TYPE(AlterDatabaseStmt, AlterDatabaseStmt) msg); -static AlterDatabaseRefreshCollStmt * _readAlterDatabaseRefreshCollStmt(OUT_TYPE(AlterDatabaseRefreshCollStmt, AlterDatabaseRefreshCollStmt) msg); -static AlterDatabaseSetStmt * _readAlterDatabaseSetStmt(OUT_TYPE(AlterDatabaseSetStmt, AlterDatabaseSetStmt) msg); -static AlterRoleSetStmt * _readAlterRoleSetStmt(OUT_TYPE(AlterRoleSetStmt, AlterRoleSetStmt) msg); static CreateConversionStmt * _readCreateConversionStmt(OUT_TYPE(CreateConversionStmt, CreateConversionStmt) msg); static CreateCastStmt * _readCreateCastStmt(OUT_TYPE(CreateCastStmt, CreateCastStmt) msg); -static CreateOpClassStmt * _readCreateOpClassStmt(OUT_TYPE(CreateOpClassStmt, CreateOpClassStmt) msg); -static CreateOpFamilyStmt * _readCreateOpFamilyStmt(OUT_TYPE(CreateOpFamilyStmt, CreateOpFamilyStmt) msg); -static AlterOpFamilyStmt * _readAlterOpFamilyStmt(OUT_TYPE(AlterOpFamilyStmt, AlterOpFamilyStmt) msg); +static CreateTransformStmt * _readCreateTransformStmt(OUT_TYPE(CreateTransformStmt, CreateTransformStmt) msg); static PrepareStmt * _readPrepareStmt(OUT_TYPE(PrepareStmt, PrepareStmt) msg); static ExecuteStmt * _readExecuteStmt(OUT_TYPE(ExecuteStmt, ExecuteStmt) msg); static DeallocateStmt * _readDeallocateStmt(OUT_TYPE(DeallocateStmt, DeallocateStmt) msg); -static DeclareCursorStmt * _readDeclareCursorStmt(OUT_TYPE(DeclareCursorStmt, DeclareCursorStmt) msg); -static CreateTableSpaceStmt * _readCreateTableSpaceStmt(OUT_TYPE(CreateTableSpaceStmt, CreateTableSpaceStmt) msg); -static DropTableSpaceStmt * _readDropTableSpaceStmt(OUT_TYPE(DropTableSpaceStmt, DropTableSpaceStmt) msg); -static AlterObjectDependsStmt * _readAlterObjectDependsStmt(OUT_TYPE(AlterObjectDependsStmt, AlterObjectDependsStmt) msg); -static AlterObjectSchemaStmt * _readAlterObjectSchemaStmt(OUT_TYPE(AlterObjectSchemaStmt, AlterObjectSchemaStmt) msg); -static AlterOwnerStmt * _readAlterOwnerStmt(OUT_TYPE(AlterOwnerStmt, AlterOwnerStmt) msg); -static AlterOperatorStmt * _readAlterOperatorStmt(OUT_TYPE(AlterOperatorStmt, AlterOperatorStmt) msg); -static AlterTypeStmt * _readAlterTypeStmt(OUT_TYPE(AlterTypeStmt, AlterTypeStmt) msg); static DropOwnedStmt * _readDropOwnedStmt(OUT_TYPE(DropOwnedStmt, DropOwnedStmt) msg); static ReassignOwnedStmt * _readReassignOwnedStmt(OUT_TYPE(ReassignOwnedStmt, ReassignOwnedStmt) msg); -static CompositeTypeStmt * _readCompositeTypeStmt(OUT_TYPE(CompositeTypeStmt, CompositeTypeStmt) msg); -static CreateEnumStmt * _readCreateEnumStmt(OUT_TYPE(CreateEnumStmt, CreateEnumStmt) msg); -static CreateRangeStmt * _readCreateRangeStmt(OUT_TYPE(CreateRangeStmt, CreateRangeStmt) msg); -static AlterEnumStmt * _readAlterEnumStmt(OUT_TYPE(AlterEnumStmt, AlterEnumStmt) msg); static AlterTSDictionaryStmt * _readAlterTSDictionaryStmt(OUT_TYPE(AlterTSDictionaryStmt, AlterTSDictionaryStmt) msg); static AlterTSConfigurationStmt * _readAlterTSConfigurationStmt(OUT_TYPE(AlterTSConfigurationStmt, AlterTSConfigurationStmt) msg); -static CreateFdwStmt * _readCreateFdwStmt(OUT_TYPE(CreateFdwStmt, CreateFdwStmt) msg); -static AlterFdwStmt * _readAlterFdwStmt(OUT_TYPE(AlterFdwStmt, AlterFdwStmt) msg); -static CreateForeignServerStmt * _readCreateForeignServerStmt(OUT_TYPE(CreateForeignServerStmt, CreateForeignServerStmt) msg); -static AlterForeignServerStmt * _readAlterForeignServerStmt(OUT_TYPE(AlterForeignServerStmt, AlterForeignServerStmt) msg); -static CreateUserMappingStmt * _readCreateUserMappingStmt(OUT_TYPE(CreateUserMappingStmt, CreateUserMappingStmt) msg); -static AlterUserMappingStmt * _readAlterUserMappingStmt(OUT_TYPE(AlterUserMappingStmt, AlterUserMappingStmt) msg); -static DropUserMappingStmt * _readDropUserMappingStmt(OUT_TYPE(DropUserMappingStmt, DropUserMappingStmt) msg); -static AlterTableSpaceOptionsStmt * _readAlterTableSpaceOptionsStmt(OUT_TYPE(AlterTableSpaceOptionsStmt, AlterTableSpaceOptionsStmt) msg); -static AlterTableMoveAllStmt * _readAlterTableMoveAllStmt(OUT_TYPE(AlterTableMoveAllStmt, AlterTableMoveAllStmt) msg); -static SecLabelStmt * _readSecLabelStmt(OUT_TYPE(SecLabelStmt, SecLabelStmt) msg); -static CreateForeignTableStmt * _readCreateForeignTableStmt(OUT_TYPE(CreateForeignTableStmt, CreateForeignTableStmt) msg); -static ImportForeignSchemaStmt * _readImportForeignSchemaStmt(OUT_TYPE(ImportForeignSchemaStmt, ImportForeignSchemaStmt) msg); -static CreateExtensionStmt * _readCreateExtensionStmt(OUT_TYPE(CreateExtensionStmt, CreateExtensionStmt) msg); -static AlterExtensionStmt * _readAlterExtensionStmt(OUT_TYPE(AlterExtensionStmt, AlterExtensionStmt) msg); -static AlterExtensionContentsStmt * _readAlterExtensionContentsStmt(OUT_TYPE(AlterExtensionContentsStmt, AlterExtensionContentsStmt) msg); -static CreateEventTrigStmt * _readCreateEventTrigStmt(OUT_TYPE(CreateEventTrigStmt, CreateEventTrigStmt) msg); -static AlterEventTrigStmt * _readAlterEventTrigStmt(OUT_TYPE(AlterEventTrigStmt, AlterEventTrigStmt) msg); -static RefreshMatViewStmt * _readRefreshMatViewStmt(OUT_TYPE(RefreshMatViewStmt, RefreshMatViewStmt) msg); -static ReplicaIdentityStmt * _readReplicaIdentityStmt(OUT_TYPE(ReplicaIdentityStmt, ReplicaIdentityStmt) msg); -static AlterSystemStmt * _readAlterSystemStmt(OUT_TYPE(AlterSystemStmt, AlterSystemStmt) msg); -static CreatePolicyStmt * _readCreatePolicyStmt(OUT_TYPE(CreatePolicyStmt, CreatePolicyStmt) msg); -static AlterPolicyStmt * _readAlterPolicyStmt(OUT_TYPE(AlterPolicyStmt, AlterPolicyStmt) msg); -static CreateTransformStmt * _readCreateTransformStmt(OUT_TYPE(CreateTransformStmt, CreateTransformStmt) msg); -static CreateAmStmt * _readCreateAmStmt(OUT_TYPE(CreateAmStmt, CreateAmStmt) msg); +static PublicationTable * _readPublicationTable(OUT_TYPE(PublicationTable, PublicationTable) msg); +static PublicationObjSpec * _readPublicationObjSpec(OUT_TYPE(PublicationObjSpec, PublicationObjSpec) msg); static CreatePublicationStmt * _readCreatePublicationStmt(OUT_TYPE(CreatePublicationStmt, CreatePublicationStmt) msg); static AlterPublicationStmt * _readAlterPublicationStmt(OUT_TYPE(AlterPublicationStmt, AlterPublicationStmt) msg); static CreateSubscriptionStmt * _readCreateSubscriptionStmt(OUT_TYPE(CreateSubscriptionStmt, CreateSubscriptionStmt) msg); static AlterSubscriptionStmt * _readAlterSubscriptionStmt(OUT_TYPE(AlterSubscriptionStmt, AlterSubscriptionStmt) msg); static DropSubscriptionStmt * _readDropSubscriptionStmt(OUT_TYPE(DropSubscriptionStmt, DropSubscriptionStmt) msg); -static CreateStatsStmt * _readCreateStatsStmt(OUT_TYPE(CreateStatsStmt, CreateStatsStmt) msg); -static AlterCollationStmt * _readAlterCollationStmt(OUT_TYPE(AlterCollationStmt, AlterCollationStmt) msg); -static CallStmt * _readCallStmt(OUT_TYPE(CallStmt, CallStmt) msg); -static AlterStatsStmt * _readAlterStatsStmt(OUT_TYPE(AlterStatsStmt, AlterStatsStmt) msg); -static A_Expr * _readAExpr(OUT_TYPE(A_Expr, AExpr) msg); -static ColumnRef * _readColumnRef(OUT_TYPE(ColumnRef, ColumnRef) msg); -static ParamRef * _readParamRef(OUT_TYPE(ParamRef, ParamRef) msg); -static FuncCall * _readFuncCall(OUT_TYPE(FuncCall, FuncCall) msg); -static A_Star * _readAStar(OUT_TYPE(A_Star, AStar) msg); -static A_Indices * _readAIndices(OUT_TYPE(A_Indices, AIndices) msg); -static A_Indirection * _readAIndirection(OUT_TYPE(A_Indirection, AIndirection) msg); -static A_ArrayExpr * _readAArrayExpr(OUT_TYPE(A_ArrayExpr, AArrayExpr) msg); -static ResTarget * _readResTarget(OUT_TYPE(ResTarget, ResTarget) msg); -static MultiAssignRef * _readMultiAssignRef(OUT_TYPE(MultiAssignRef, MultiAssignRef) msg); -static TypeCast * _readTypeCast(OUT_TYPE(TypeCast, TypeCast) msg); -static CollateClause * _readCollateClause(OUT_TYPE(CollateClause, CollateClause) msg); -static SortBy * _readSortBy(OUT_TYPE(SortBy, SortBy) msg); -static WindowDef * _readWindowDef(OUT_TYPE(WindowDef, WindowDef) msg); -static RangeSubselect * _readRangeSubselect(OUT_TYPE(RangeSubselect, RangeSubselect) msg); -static RangeFunction * _readRangeFunction(OUT_TYPE(RangeFunction, RangeFunction) msg); -static RangeTableSample * _readRangeTableSample(OUT_TYPE(RangeTableSample, RangeTableSample) msg); -static RangeTableFunc * _readRangeTableFunc(OUT_TYPE(RangeTableFunc, RangeTableFunc) msg); -static RangeTableFuncCol * _readRangeTableFuncCol(OUT_TYPE(RangeTableFuncCol, RangeTableFuncCol) msg); -static TypeName * _readTypeName(OUT_TYPE(TypeName, TypeName) msg); -static ColumnDef * _readColumnDef(OUT_TYPE(ColumnDef, ColumnDef) msg); -static IndexElem * _readIndexElem(OUT_TYPE(IndexElem, IndexElem) msg); -static StatsElem * _readStatsElem(OUT_TYPE(StatsElem, StatsElem) msg); -static Constraint * _readConstraint(OUT_TYPE(Constraint, Constraint) msg); -static DefElem * _readDefElem(OUT_TYPE(DefElem, DefElem) msg); -static RangeTblEntry * _readRangeTblEntry(OUT_TYPE(RangeTblEntry, RangeTblEntry) msg); -static RangeTblFunction * _readRangeTblFunction(OUT_TYPE(RangeTblFunction, RangeTblFunction) msg); -static TableSampleClause * _readTableSampleClause(OUT_TYPE(TableSampleClause, TableSampleClause) msg); -static WithCheckOption * _readWithCheckOption(OUT_TYPE(WithCheckOption, WithCheckOption) msg); -static SortGroupClause * _readSortGroupClause(OUT_TYPE(SortGroupClause, SortGroupClause) msg); -static GroupingSet * _readGroupingSet(OUT_TYPE(GroupingSet, GroupingSet) msg); -static WindowClause * _readWindowClause(OUT_TYPE(WindowClause, WindowClause) msg); -static ObjectWithArgs * _readObjectWithArgs(OUT_TYPE(ObjectWithArgs, ObjectWithArgs) msg); -static AccessPriv * _readAccessPriv(OUT_TYPE(AccessPriv, AccessPriv) msg); -static CreateOpClassItem * _readCreateOpClassItem(OUT_TYPE(CreateOpClassItem, CreateOpClassItem) msg); -static TableLikeClause * _readTableLikeClause(OUT_TYPE(TableLikeClause, TableLikeClause) msg); -static FunctionParameter * _readFunctionParameter(OUT_TYPE(FunctionParameter, FunctionParameter) msg); -static LockingClause * _readLockingClause(OUT_TYPE(LockingClause, LockingClause) msg); -static RowMarkClause * _readRowMarkClause(OUT_TYPE(RowMarkClause, RowMarkClause) msg); -static XmlSerialize * _readXmlSerialize(OUT_TYPE(XmlSerialize, XmlSerialize) msg); -static WithClause * _readWithClause(OUT_TYPE(WithClause, WithClause) msg); -static InferClause * _readInferClause(OUT_TYPE(InferClause, InferClause) msg); -static OnConflictClause * _readOnConflictClause(OUT_TYPE(OnConflictClause, OnConflictClause) msg); -static CTESearchClause * _readCTESearchClause(OUT_TYPE(CTESearchClause, CTESearchClause) msg); -static CTECycleClause * _readCTECycleClause(OUT_TYPE(CTECycleClause, CTECycleClause) msg); -static CommonTableExpr * _readCommonTableExpr(OUT_TYPE(CommonTableExpr, CommonTableExpr) msg); -static MergeWhenClause * _readMergeWhenClause(OUT_TYPE(MergeWhenClause, MergeWhenClause) msg); -static RoleSpec * _readRoleSpec(OUT_TYPE(RoleSpec, RoleSpec) msg); -static TriggerTransition * _readTriggerTransition(OUT_TYPE(TriggerTransition, TriggerTransition) msg); -static PartitionElem * _readPartitionElem(OUT_TYPE(PartitionElem, PartitionElem) msg); -static PartitionSpec * _readPartitionSpec(OUT_TYPE(PartitionSpec, PartitionSpec) msg); -static PartitionBoundSpec * _readPartitionBoundSpec(OUT_TYPE(PartitionBoundSpec, PartitionBoundSpec) msg); -static PartitionRangeDatum * _readPartitionRangeDatum(OUT_TYPE(PartitionRangeDatum, PartitionRangeDatum) msg); -static PartitionCmd * _readPartitionCmd(OUT_TYPE(PartitionCmd, PartitionCmd) msg); -static VacuumRelation * _readVacuumRelation(OUT_TYPE(VacuumRelation, VacuumRelation) msg); -static PublicationObjSpec * _readPublicationObjSpec(OUT_TYPE(PublicationObjSpec, PublicationObjSpec) msg); -static PublicationTable * _readPublicationTable(OUT_TYPE(PublicationTable, PublicationTable) msg); -static InlineCodeBlock * _readInlineCodeBlock(OUT_TYPE(InlineCodeBlock, InlineCodeBlock) msg); -static CallContext * _readCallContext(OUT_TYPE(CallContext, CallContext) msg); static Alias * @@ -274,18 +288,32 @@ _readTableFunc(OUT_TYPE(TableFunc, TableFunc) msg) return node; } -static Var * -_readVar(OUT_TYPE(Var, Var) msg) +static IntoClause * +_readIntoClause(OUT_TYPE(IntoClause, IntoClause) msg) { - Var *node = makeNode(Var); - READ_INT_FIELD(varno, varno, varno); - READ_INT_FIELD(varattno, varattno, varattno); - READ_UINT_FIELD(vartype, vartype, vartype); - READ_INT_FIELD(vartypmod, vartypmod, vartypmod); - READ_UINT_FIELD(varcollid, varcollid, varcollid); + IntoClause *node = makeNode(IntoClause); + READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, rel, rel, rel); + READ_LIST_FIELD(col_names, colNames, colNames); + READ_STRING_FIELD(access_method, accessMethod, accessMethod); + READ_LIST_FIELD(options, options, options); + READ_ENUM_FIELD(OnCommitAction, on_commit, onCommit, onCommit); + READ_STRING_FIELD(table_space_name, tableSpaceName, tableSpaceName); + READ_NODE_PTR_FIELD(view_query, viewQuery, viewQuery); + READ_BOOL_FIELD(skip_data, skipData, skipData); + return node; +} + +static Var * +_readVar(OUT_TYPE(Var, Var) msg) +{ + Var *node = makeNode(Var); + READ_INT_FIELD(varno, varno, varno); + READ_INT_FIELD(varattno, varattno, varattno); + READ_UINT_FIELD(vartype, vartype, vartype); + READ_INT_FIELD(vartypmod, vartypmod, vartypmod); + READ_UINT_FIELD(varcollid, varcollid, varcollid); + READ_BITMAPSET_FIELD(varnullingrels, varnullingrels, varnullingrels); READ_UINT_FIELD(varlevelsup, varlevelsup, varlevelsup); - READ_UINT_FIELD(varnosyn, varnosyn, varnosyn); - READ_INT_FIELD(varattnosyn, varattnosyn, varattnosyn); READ_INT_FIELD(location, location, location); return node; } @@ -311,7 +339,6 @@ _readAggref(OUT_TYPE(Aggref, Aggref) msg) READ_UINT_FIELD(aggtype, aggtype, aggtype); READ_UINT_FIELD(aggcollid, aggcollid, aggcollid); READ_UINT_FIELD(inputcollid, inputcollid, inputcollid); - READ_UINT_FIELD(aggtranstype, aggtranstype, aggtranstype); READ_LIST_FIELD(aggargtypes, aggargtypes, aggargtypes); READ_LIST_FIELD(aggdirectargs, aggdirectargs, aggdirectargs); READ_LIST_FIELD(args, args, args); @@ -335,7 +362,6 @@ _readGroupingFunc(OUT_TYPE(GroupingFunc, GroupingFunc) msg) GroupingFunc *node = makeNode(GroupingFunc); READ_LIST_FIELD(args, args, args); READ_LIST_FIELD(refs, refs, refs); - READ_LIST_FIELD(cols, cols, cols); READ_UINT_FIELD(agglevelsup, agglevelsup, agglevelsup); READ_INT_FIELD(location, location, location); return node; @@ -406,7 +432,6 @@ _readOpExpr(OUT_TYPE(OpExpr, OpExpr) msg) { OpExpr *node = makeNode(OpExpr); READ_UINT_FIELD(opno, opno, opno); - READ_UINT_FIELD(opfuncid, opfuncid, opfuncid); READ_UINT_FIELD(opresulttype, opresulttype, opresulttype); READ_BOOL_FIELD(opretset, opretset, opretset); READ_UINT_FIELD(opcollid, opcollid, opcollid); @@ -421,7 +446,6 @@ _readDistinctExpr(OUT_TYPE(DistinctExpr, DistinctExpr) msg) { DistinctExpr *node = makeNode(DistinctExpr); READ_UINT_FIELD(opno, opno, opno); - READ_UINT_FIELD(opfuncid, opfuncid, opfuncid); READ_UINT_FIELD(opresulttype, opresulttype, opresulttype); READ_BOOL_FIELD(opretset, opretset, opretset); READ_UINT_FIELD(opcollid, opcollid, opcollid); @@ -436,7 +460,6 @@ _readNullIfExpr(OUT_TYPE(NullIfExpr, NullIfExpr) msg) { NullIfExpr *node = makeNode(NullIfExpr); READ_UINT_FIELD(opno, opno, opno); - READ_UINT_FIELD(opfuncid, opfuncid, opfuncid); READ_UINT_FIELD(opresulttype, opresulttype, opresulttype); READ_BOOL_FIELD(opretset, opretset, opretset); READ_UINT_FIELD(opcollid, opcollid, opcollid); @@ -451,9 +474,6 @@ _readScalarArrayOpExpr(OUT_TYPE(ScalarArrayOpExpr, ScalarArrayOpExpr) msg) { ScalarArrayOpExpr *node = makeNode(ScalarArrayOpExpr); READ_UINT_FIELD(opno, opno, opno); - READ_UINT_FIELD(opfuncid, opfuncid, opfuncid); - READ_UINT_FIELD(hashfuncid, hashfuncid, hashfuncid); - READ_UINT_FIELD(negfuncid, negfuncid, negfuncid); READ_BOOL_FIELD(use_or, useOr, useOr); READ_UINT_FIELD(inputcollid, inputcollid, inputcollid); READ_LIST_FIELD(args, args, args); @@ -714,12 +734,70 @@ _readXmlExpr(OUT_TYPE(XmlExpr, XmlExpr) msg) READ_LIST_FIELD(arg_names, arg_names, arg_names); READ_LIST_FIELD(args, args, args); READ_ENUM_FIELD(XmlOptionType, xmloption, xmloption, xmloption); + READ_BOOL_FIELD(indent, indent, indent); READ_UINT_FIELD(type, type, type); READ_INT_FIELD(typmod, typmod, typmod); READ_INT_FIELD(location, location, location); return node; } +static JsonFormat * +_readJsonFormat(OUT_TYPE(JsonFormat, JsonFormat) msg) +{ + JsonFormat *node = makeNode(JsonFormat); + READ_ENUM_FIELD(JsonFormatType, format_type, format_type, format_type); + READ_ENUM_FIELD(JsonEncoding, encoding, encoding, encoding); + READ_INT_FIELD(location, location, location); + return node; +} + +static JsonReturning * +_readJsonReturning(OUT_TYPE(JsonReturning, JsonReturning) msg) +{ + JsonReturning *node = makeNode(JsonReturning); + READ_SPECIFIC_NODE_PTR_FIELD(JsonFormat, json_format, format, format, format); + READ_UINT_FIELD(typid, typid, typid); + READ_INT_FIELD(typmod, typmod, typmod); + return node; +} + +static JsonValueExpr * +_readJsonValueExpr(OUT_TYPE(JsonValueExpr, JsonValueExpr) msg) +{ + JsonValueExpr *node = makeNode(JsonValueExpr); + READ_EXPR_PTR_FIELD(raw_expr, raw_expr, raw_expr); + READ_EXPR_PTR_FIELD(formatted_expr, formatted_expr, formatted_expr); + READ_SPECIFIC_NODE_PTR_FIELD(JsonFormat, json_format, format, format, format); + return node; +} + +static JsonConstructorExpr * +_readJsonConstructorExpr(OUT_TYPE(JsonConstructorExpr, JsonConstructorExpr) msg) +{ + JsonConstructorExpr *node = makeNode(JsonConstructorExpr); + READ_ENUM_FIELD(JsonConstructorType, type, type, type); + READ_LIST_FIELD(args, args, args); + READ_EXPR_PTR_FIELD(func, func, func); + READ_EXPR_PTR_FIELD(coercion, coercion, coercion); + READ_SPECIFIC_NODE_PTR_FIELD(JsonReturning, json_returning, returning, returning, returning); + READ_BOOL_FIELD(absent_on_null, absent_on_null, absent_on_null); + READ_BOOL_FIELD(unique, unique, unique); + READ_INT_FIELD(location, location, location); + return node; +} + +static JsonIsPredicate * +_readJsonIsPredicate(OUT_TYPE(JsonIsPredicate, JsonIsPredicate) msg) +{ + JsonIsPredicate *node = makeNode(JsonIsPredicate); + READ_NODE_PTR_FIELD(expr, expr, expr); + READ_SPECIFIC_NODE_PTR_FIELD(JsonFormat, json_format, format, format, format); + READ_ENUM_FIELD(JsonValueType, item_type, item_type, item_type); + READ_BOOL_FIELD(unique_keys, unique_keys, unique_keys); + READ_INT_FIELD(location, location, location); + return node; +} + static NullTest * _readNullTest(OUT_TYPE(NullTest, NullTest) msg) { @@ -867,44 +945,6 @@ _readOnConflictExpr(OUT_TYPE(OnConflictExpr, OnConflictExpr) msg) return node; } -static IntoClause * -_readIntoClause(OUT_TYPE(IntoClause, IntoClause) msg) -{ - IntoClause *node = makeNode(IntoClause); - READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, rel, rel, rel); - READ_LIST_FIELD(col_names, colNames, colNames); - READ_STRING_FIELD(access_method, accessMethod, accessMethod); - READ_LIST_FIELD(options, options, options); - READ_ENUM_FIELD(OnCommitAction, on_commit, onCommit, onCommit); - READ_STRING_FIELD(table_space_name, tableSpaceName, tableSpaceName); - READ_NODE_PTR_FIELD(view_query, viewQuery, viewQuery); - READ_BOOL_FIELD(skip_data, skipData, skipData); - return node; -} - -static MergeAction * -_readMergeAction(OUT_TYPE(MergeAction, MergeAction) msg) -{ - MergeAction *node = makeNode(MergeAction); - READ_BOOL_FIELD(matched, matched, matched); - READ_ENUM_FIELD(CmdType, command_type, commandType, commandType); - READ_ENUM_FIELD(OverridingKind, override, override, override); - READ_NODE_PTR_FIELD(qual, qual, qual); - READ_LIST_FIELD(target_list, targetList, targetList); - READ_LIST_FIELD(update_colnos, updateColnos, updateColnos); - return node; -} - -static RawStmt * -_readRawStmt(OUT_TYPE(RawStmt, RawStmt) msg) -{ - RawStmt *node = makeNode(RawStmt); - READ_NODE_PTR_FIELD(stmt, stmt, stmt); - READ_INT_FIELD(stmt_location, stmt_location, stmt_location); - READ_INT_FIELD(stmt_len, stmt_len, stmt_len); - return node; -} - static Query * _readQuery(OUT_TYPE(Query, Query) msg) { @@ -926,6 +966,7 @@ _readQuery(OUT_TYPE(Query, Query) msg) READ_BOOL_FIELD(is_return, isReturn, isReturn); READ_LIST_FIELD(cte_list, cteList, cteList); READ_LIST_FIELD(rtable, rtable, rtable); + READ_LIST_FIELD(rteperminfos, rteperminfos, rteperminfos); READ_SPECIFIC_NODE_PTR_FIELD(FromExpr, from_expr, jointree, jointree, jointree); READ_LIST_FIELD(merge_action_list, mergeActionList, mergeActionList); READ_BOOL_FIELD(merge_use_outer_join, mergeUseOuterJoin, mergeUseOuterJoin); @@ -952,664 +993,854 @@ _readQuery(OUT_TYPE(Query, Query) msg) return node; } -static InsertStmt * -_readInsertStmt(OUT_TYPE(InsertStmt, InsertStmt) msg) +static TypeName * +_readTypeName(OUT_TYPE(TypeName, TypeName) msg) { - InsertStmt *node = makeNode(InsertStmt); - READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); - READ_LIST_FIELD(cols, cols, cols); - READ_NODE_PTR_FIELD(select_stmt, selectStmt, selectStmt); - READ_SPECIFIC_NODE_PTR_FIELD(OnConflictClause, on_conflict_clause, on_conflict_clause, onConflictClause, onConflictClause); - READ_LIST_FIELD(returning_list, returningList, returningList); - READ_SPECIFIC_NODE_PTR_FIELD(WithClause, with_clause, with_clause, withClause, withClause); - READ_ENUM_FIELD(OverridingKind, override, override, override); + TypeName *node = makeNode(TypeName); + READ_LIST_FIELD(names, names, names); + READ_UINT_FIELD(type_oid, typeOid, typeOid); + READ_BOOL_FIELD(setof, setof, setof); + READ_BOOL_FIELD(pct_type, pct_type, pct_type); + READ_LIST_FIELD(typmods, typmods, typmods); + READ_INT_FIELD(typemod, typemod, typemod); + READ_LIST_FIELD(array_bounds, arrayBounds, arrayBounds); + READ_INT_FIELD(location, location, location); return node; } -static DeleteStmt * -_readDeleteStmt(OUT_TYPE(DeleteStmt, DeleteStmt) msg) +static ColumnRef * +_readColumnRef(OUT_TYPE(ColumnRef, ColumnRef) msg) { - DeleteStmt *node = makeNode(DeleteStmt); - READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); - READ_LIST_FIELD(using_clause, usingClause, usingClause); - READ_NODE_PTR_FIELD(where_clause, whereClause, whereClause); - READ_LIST_FIELD(returning_list, returningList, returningList); - READ_SPECIFIC_NODE_PTR_FIELD(WithClause, with_clause, with_clause, withClause, withClause); + ColumnRef *node = makeNode(ColumnRef); + READ_LIST_FIELD(fields, fields, fields); + READ_INT_FIELD(location, location, location); return node; } -static UpdateStmt * -_readUpdateStmt(OUT_TYPE(UpdateStmt, UpdateStmt) msg) +static ParamRef * +_readParamRef(OUT_TYPE(ParamRef, ParamRef) msg) { - UpdateStmt *node = makeNode(UpdateStmt); - READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); - READ_LIST_FIELD(target_list, targetList, targetList); - READ_NODE_PTR_FIELD(where_clause, whereClause, whereClause); - READ_LIST_FIELD(from_clause, fromClause, fromClause); - READ_LIST_FIELD(returning_list, returningList, returningList); - READ_SPECIFIC_NODE_PTR_FIELD(WithClause, with_clause, with_clause, withClause, withClause); + ParamRef *node = makeNode(ParamRef); + READ_INT_FIELD(number, number, number); + READ_INT_FIELD(location, location, location); return node; } -static MergeStmt * -_readMergeStmt(OUT_TYPE(MergeStmt, MergeStmt) msg) +static A_Expr * +_readAExpr(OUT_TYPE(A_Expr, AExpr) msg) { - MergeStmt *node = makeNode(MergeStmt); - READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); - READ_NODE_PTR_FIELD(source_relation, sourceRelation, sourceRelation); - READ_NODE_PTR_FIELD(join_condition, joinCondition, joinCondition); - READ_LIST_FIELD(merge_when_clauses, mergeWhenClauses, mergeWhenClauses); - READ_SPECIFIC_NODE_PTR_FIELD(WithClause, with_clause, with_clause, withClause, withClause); + A_Expr *node = makeNode(A_Expr); + READ_ENUM_FIELD(A_Expr_Kind, kind, kind, kind); + READ_LIST_FIELD(name, name, name); + READ_NODE_PTR_FIELD(lexpr, lexpr, lexpr); + READ_NODE_PTR_FIELD(rexpr, rexpr, rexpr); + READ_INT_FIELD(location, location, location); return node; } -static SelectStmt * -_readSelectStmt(OUT_TYPE(SelectStmt, SelectStmt) msg) +static TypeCast * +_readTypeCast(OUT_TYPE(TypeCast, TypeCast) msg) { - SelectStmt *node = makeNode(SelectStmt); - READ_LIST_FIELD(distinct_clause, distinctClause, distinctClause); - READ_SPECIFIC_NODE_PTR_FIELD(IntoClause, into_clause, into_clause, intoClause, intoClause); - READ_LIST_FIELD(target_list, targetList, targetList); - READ_LIST_FIELD(from_clause, fromClause, fromClause); - READ_NODE_PTR_FIELD(where_clause, whereClause, whereClause); - READ_LIST_FIELD(group_clause, groupClause, groupClause); - READ_BOOL_FIELD(group_distinct, groupDistinct, groupDistinct); - READ_NODE_PTR_FIELD(having_clause, havingClause, havingClause); - READ_LIST_FIELD(window_clause, windowClause, windowClause); - READ_LIST_FIELD(values_lists, valuesLists, valuesLists); - READ_LIST_FIELD(sort_clause, sortClause, sortClause); - READ_NODE_PTR_FIELD(limit_offset, limitOffset, limitOffset); - READ_NODE_PTR_FIELD(limit_count, limitCount, limitCount); - READ_ENUM_FIELD(LimitOption, limit_option, limitOption, limitOption); - READ_LIST_FIELD(locking_clause, lockingClause, lockingClause); - READ_SPECIFIC_NODE_PTR_FIELD(WithClause, with_clause, with_clause, withClause, withClause); - READ_ENUM_FIELD(SetOperation, op, op, op); - READ_BOOL_FIELD(all, all, all); - READ_SPECIFIC_NODE_PTR_FIELD(SelectStmt, select_stmt, larg, larg, larg); - READ_SPECIFIC_NODE_PTR_FIELD(SelectStmt, select_stmt, rarg, rarg, rarg); + TypeCast *node = makeNode(TypeCast); + READ_NODE_PTR_FIELD(arg, arg, arg); + READ_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, type_name, typeName, typeName); + READ_INT_FIELD(location, location, location); return node; } -static ReturnStmt * -_readReturnStmt(OUT_TYPE(ReturnStmt, ReturnStmt) msg) +static CollateClause * +_readCollateClause(OUT_TYPE(CollateClause, CollateClause) msg) { - ReturnStmt *node = makeNode(ReturnStmt); - READ_NODE_PTR_FIELD(returnval, returnval, returnval); + CollateClause *node = makeNode(CollateClause); + READ_NODE_PTR_FIELD(arg, arg, arg); + READ_LIST_FIELD(collname, collname, collname); + READ_INT_FIELD(location, location, location); return node; } -static PLAssignStmt * -_readPLAssignStmt(OUT_TYPE(PLAssignStmt, PLAssignStmt) msg) +static RoleSpec * +_readRoleSpec(OUT_TYPE(RoleSpec, RoleSpec) msg) { - PLAssignStmt *node = makeNode(PLAssignStmt); - READ_STRING_FIELD(name, name, name); - READ_LIST_FIELD(indirection, indirection, indirection); - READ_INT_FIELD(nnames, nnames, nnames); - READ_SPECIFIC_NODE_PTR_FIELD(SelectStmt, select_stmt, val, val, val); + RoleSpec *node = makeNode(RoleSpec); + READ_ENUM_FIELD(RoleSpecType, roletype, roletype, roletype); + READ_STRING_FIELD(rolename, rolename, rolename); READ_INT_FIELD(location, location, location); return node; } -static AlterTableStmt * -_readAlterTableStmt(OUT_TYPE(AlterTableStmt, AlterTableStmt) msg) +static FuncCall * +_readFuncCall(OUT_TYPE(FuncCall, FuncCall) msg) { - AlterTableStmt *node = makeNode(AlterTableStmt); - READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); - READ_LIST_FIELD(cmds, cmds, cmds); - READ_ENUM_FIELD(ObjectType, objtype, objtype, objtype); - READ_BOOL_FIELD(missing_ok, missing_ok, missing_ok); + FuncCall *node = makeNode(FuncCall); + READ_LIST_FIELD(funcname, funcname, funcname); + READ_LIST_FIELD(args, args, args); + READ_LIST_FIELD(agg_order, agg_order, agg_order); + READ_NODE_PTR_FIELD(agg_filter, agg_filter, agg_filter); + READ_SPECIFIC_NODE_PTR_FIELD(WindowDef, window_def, over, over, over); + READ_BOOL_FIELD(agg_within_group, agg_within_group, agg_within_group); + READ_BOOL_FIELD(agg_star, agg_star, agg_star); + READ_BOOL_FIELD(agg_distinct, agg_distinct, agg_distinct); + READ_BOOL_FIELD(func_variadic, func_variadic, func_variadic); + READ_ENUM_FIELD(CoercionForm, funcformat, funcformat, funcformat); + READ_INT_FIELD(location, location, location); return node; } -static AlterTableCmd * -_readAlterTableCmd(OUT_TYPE(AlterTableCmd, AlterTableCmd) msg) +static A_Star * +_readAStar(OUT_TYPE(A_Star, AStar) msg) { - AlterTableCmd *node = makeNode(AlterTableCmd); - READ_ENUM_FIELD(AlterTableType, subtype, subtype, subtype); - READ_STRING_FIELD(name, name, name); - READ_INT_FIELD(num, num, num); - READ_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, newowner, newowner, newowner); - READ_NODE_PTR_FIELD(def, def, def); - READ_ENUM_FIELD(DropBehavior, behavior, behavior, behavior); - READ_BOOL_FIELD(missing_ok, missing_ok, missing_ok); - READ_BOOL_FIELD(recurse, recurse, recurse); + A_Star *node = makeNode(A_Star); return node; } -static AlterDomainStmt * -_readAlterDomainStmt(OUT_TYPE(AlterDomainStmt, AlterDomainStmt) msg) +static A_Indices * +_readAIndices(OUT_TYPE(A_Indices, AIndices) msg) { - AlterDomainStmt *node = makeNode(AlterDomainStmt); - READ_CHAR_FIELD(subtype, subtype, subtype); - READ_LIST_FIELD(type_name, typeName, typeName); - READ_STRING_FIELD(name, name, name); - READ_NODE_PTR_FIELD(def, def, def); - READ_ENUM_FIELD(DropBehavior, behavior, behavior, behavior); - READ_BOOL_FIELD(missing_ok, missing_ok, missing_ok); + A_Indices *node = makeNode(A_Indices); + READ_BOOL_FIELD(is_slice, is_slice, is_slice); + READ_NODE_PTR_FIELD(lidx, lidx, lidx); + READ_NODE_PTR_FIELD(uidx, uidx, uidx); return node; } -static SetOperationStmt * -_readSetOperationStmt(OUT_TYPE(SetOperationStmt, SetOperationStmt) msg) +static A_Indirection * +_readAIndirection(OUT_TYPE(A_Indirection, AIndirection) msg) { - SetOperationStmt *node = makeNode(SetOperationStmt); - READ_ENUM_FIELD(SetOperation, op, op, op); - READ_BOOL_FIELD(all, all, all); - READ_NODE_PTR_FIELD(larg, larg, larg); - READ_NODE_PTR_FIELD(rarg, rarg, rarg); - READ_LIST_FIELD(col_types, colTypes, colTypes); - READ_LIST_FIELD(col_typmods, colTypmods, colTypmods); - READ_LIST_FIELD(col_collations, colCollations, colCollations); - READ_LIST_FIELD(group_clauses, groupClauses, groupClauses); + A_Indirection *node = makeNode(A_Indirection); + READ_NODE_PTR_FIELD(arg, arg, arg); + READ_LIST_FIELD(indirection, indirection, indirection); return node; } -static GrantStmt * -_readGrantStmt(OUT_TYPE(GrantStmt, GrantStmt) msg) +static A_ArrayExpr * +_readAArrayExpr(OUT_TYPE(A_ArrayExpr, AArrayExpr) msg) { - GrantStmt *node = makeNode(GrantStmt); - READ_BOOL_FIELD(is_grant, is_grant, is_grant); - READ_ENUM_FIELD(GrantTargetType, targtype, targtype, targtype); - READ_ENUM_FIELD(ObjectType, objtype, objtype, objtype); - READ_LIST_FIELD(objects, objects, objects); - READ_LIST_FIELD(privileges, privileges, privileges); - READ_LIST_FIELD(grantees, grantees, grantees); - READ_BOOL_FIELD(grant_option, grant_option, grant_option); - READ_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, grantor, grantor, grantor); - READ_ENUM_FIELD(DropBehavior, behavior, behavior, behavior); + A_ArrayExpr *node = makeNode(A_ArrayExpr); + READ_LIST_FIELD(elements, elements, elements); + READ_INT_FIELD(location, location, location); return node; } -static GrantRoleStmt * -_readGrantRoleStmt(OUT_TYPE(GrantRoleStmt, GrantRoleStmt) msg) +static ResTarget * +_readResTarget(OUT_TYPE(ResTarget, ResTarget) msg) { - GrantRoleStmt *node = makeNode(GrantRoleStmt); - READ_LIST_FIELD(granted_roles, granted_roles, granted_roles); - READ_LIST_FIELD(grantee_roles, grantee_roles, grantee_roles); - READ_BOOL_FIELD(is_grant, is_grant, is_grant); - READ_BOOL_FIELD(admin_opt, admin_opt, admin_opt); - READ_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, grantor, grantor, grantor); - READ_ENUM_FIELD(DropBehavior, behavior, behavior, behavior); + ResTarget *node = makeNode(ResTarget); + READ_STRING_FIELD(name, name, name); + READ_LIST_FIELD(indirection, indirection, indirection); + READ_NODE_PTR_FIELD(val, val, val); + READ_INT_FIELD(location, location, location); return node; } -static AlterDefaultPrivilegesStmt * -_readAlterDefaultPrivilegesStmt(OUT_TYPE(AlterDefaultPrivilegesStmt, AlterDefaultPrivilegesStmt) msg) +static MultiAssignRef * +_readMultiAssignRef(OUT_TYPE(MultiAssignRef, MultiAssignRef) msg) { - AlterDefaultPrivilegesStmt *node = makeNode(AlterDefaultPrivilegesStmt); - READ_LIST_FIELD(options, options, options); - READ_SPECIFIC_NODE_PTR_FIELD(GrantStmt, grant_stmt, action, action, action); + MultiAssignRef *node = makeNode(MultiAssignRef); + READ_NODE_PTR_FIELD(source, source, source); + READ_INT_FIELD(colno, colno, colno); + READ_INT_FIELD(ncolumns, ncolumns, ncolumns); return node; } -static ClosePortalStmt * -_readClosePortalStmt(OUT_TYPE(ClosePortalStmt, ClosePortalStmt) msg) +static SortBy * +_readSortBy(OUT_TYPE(SortBy, SortBy) msg) { - ClosePortalStmt *node = makeNode(ClosePortalStmt); - READ_STRING_FIELD(portalname, portalname, portalname); + SortBy *node = makeNode(SortBy); + READ_NODE_PTR_FIELD(node, node, node); + READ_ENUM_FIELD(SortByDir, sortby_dir, sortby_dir, sortby_dir); + READ_ENUM_FIELD(SortByNulls, sortby_nulls, sortby_nulls, sortby_nulls); + READ_LIST_FIELD(use_op, useOp, useOp); + READ_INT_FIELD(location, location, location); return node; } -static ClusterStmt * -_readClusterStmt(OUT_TYPE(ClusterStmt, ClusterStmt) msg) +static WindowDef * +_readWindowDef(OUT_TYPE(WindowDef, WindowDef) msg) { - ClusterStmt *node = makeNode(ClusterStmt); - READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); - READ_STRING_FIELD(indexname, indexname, indexname); - READ_LIST_FIELD(params, params, params); + WindowDef *node = makeNode(WindowDef); + READ_STRING_FIELD(name, name, name); + READ_STRING_FIELD(refname, refname, refname); + READ_LIST_FIELD(partition_clause, partitionClause, partitionClause); + READ_LIST_FIELD(order_clause, orderClause, orderClause); + READ_INT_FIELD(frame_options, frameOptions, frameOptions); + READ_NODE_PTR_FIELD(start_offset, startOffset, startOffset); + READ_NODE_PTR_FIELD(end_offset, endOffset, endOffset); + READ_INT_FIELD(location, location, location); return node; } -static CopyStmt * -_readCopyStmt(OUT_TYPE(CopyStmt, CopyStmt) msg) +static RangeSubselect * +_readRangeSubselect(OUT_TYPE(RangeSubselect, RangeSubselect) msg) { - CopyStmt *node = makeNode(CopyStmt); - READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); - READ_NODE_PTR_FIELD(query, query, query); - READ_LIST_FIELD(attlist, attlist, attlist); - READ_BOOL_FIELD(is_from, is_from, is_from); - READ_BOOL_FIELD(is_program, is_program, is_program); - READ_STRING_FIELD(filename, filename, filename); - READ_LIST_FIELD(options, options, options); - READ_NODE_PTR_FIELD(where_clause, whereClause, whereClause); + RangeSubselect *node = makeNode(RangeSubselect); + READ_BOOL_FIELD(lateral, lateral, lateral); + READ_NODE_PTR_FIELD(subquery, subquery, subquery); + READ_SPECIFIC_NODE_PTR_FIELD(Alias, alias, alias, alias, alias); return node; } -static CreateStmt * -_readCreateStmt(OUT_TYPE(CreateStmt, CreateStmt) msg) +static RangeFunction * +_readRangeFunction(OUT_TYPE(RangeFunction, RangeFunction) msg) { - CreateStmt *node = makeNode(CreateStmt); - READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); - READ_LIST_FIELD(table_elts, tableElts, tableElts); - READ_LIST_FIELD(inh_relations, inhRelations, inhRelations); - READ_SPECIFIC_NODE_PTR_FIELD(PartitionBoundSpec, partition_bound_spec, partbound, partbound, partbound); - READ_SPECIFIC_NODE_PTR_FIELD(PartitionSpec, partition_spec, partspec, partspec, partspec); - READ_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, of_typename, ofTypename, ofTypename); - READ_LIST_FIELD(constraints, constraints, constraints); - READ_LIST_FIELD(options, options, options); - READ_ENUM_FIELD(OnCommitAction, oncommit, oncommit, oncommit); - READ_STRING_FIELD(tablespacename, tablespacename, tablespacename); - READ_STRING_FIELD(access_method, accessMethod, accessMethod); - READ_BOOL_FIELD(if_not_exists, if_not_exists, if_not_exists); + RangeFunction *node = makeNode(RangeFunction); + READ_BOOL_FIELD(lateral, lateral, lateral); + READ_BOOL_FIELD(ordinality, ordinality, ordinality); + READ_BOOL_FIELD(is_rowsfrom, is_rowsfrom, is_rowsfrom); + READ_LIST_FIELD(functions, functions, functions); + READ_SPECIFIC_NODE_PTR_FIELD(Alias, alias, alias, alias, alias); + READ_LIST_FIELD(coldeflist, coldeflist, coldeflist); return node; } -static DefineStmt * -_readDefineStmt(OUT_TYPE(DefineStmt, DefineStmt) msg) +static RangeTableFunc * +_readRangeTableFunc(OUT_TYPE(RangeTableFunc, RangeTableFunc) msg) { - DefineStmt *node = makeNode(DefineStmt); - READ_ENUM_FIELD(ObjectType, kind, kind, kind); - READ_BOOL_FIELD(oldstyle, oldstyle, oldstyle); - READ_LIST_FIELD(defnames, defnames, defnames); + RangeTableFunc *node = makeNode(RangeTableFunc); + READ_BOOL_FIELD(lateral, lateral, lateral); + READ_NODE_PTR_FIELD(docexpr, docexpr, docexpr); + READ_NODE_PTR_FIELD(rowexpr, rowexpr, rowexpr); + READ_LIST_FIELD(namespaces, namespaces, namespaces); + READ_LIST_FIELD(columns, columns, columns); + READ_SPECIFIC_NODE_PTR_FIELD(Alias, alias, alias, alias, alias); + READ_INT_FIELD(location, location, location); + return node; +} + +static RangeTableFuncCol * +_readRangeTableFuncCol(OUT_TYPE(RangeTableFuncCol, RangeTableFuncCol) msg) +{ + RangeTableFuncCol *node = makeNode(RangeTableFuncCol); + READ_STRING_FIELD(colname, colname, colname); + READ_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, type_name, typeName, typeName); + READ_BOOL_FIELD(for_ordinality, for_ordinality, for_ordinality); + READ_BOOL_FIELD(is_not_null, is_not_null, is_not_null); + READ_NODE_PTR_FIELD(colexpr, colexpr, colexpr); + READ_NODE_PTR_FIELD(coldefexpr, coldefexpr, coldefexpr); + READ_INT_FIELD(location, location, location); + return node; +} + +static RangeTableSample * +_readRangeTableSample(OUT_TYPE(RangeTableSample, RangeTableSample) msg) +{ + RangeTableSample *node = makeNode(RangeTableSample); + READ_NODE_PTR_FIELD(relation, relation, relation); + READ_LIST_FIELD(method, method, method); READ_LIST_FIELD(args, args, args); - READ_LIST_FIELD(definition, definition, definition); - READ_BOOL_FIELD(if_not_exists, if_not_exists, if_not_exists); - READ_BOOL_FIELD(replace, replace, replace); + READ_NODE_PTR_FIELD(repeatable, repeatable, repeatable); + READ_INT_FIELD(location, location, location); return node; } -static DropStmt * -_readDropStmt(OUT_TYPE(DropStmt, DropStmt) msg) +static ColumnDef * +_readColumnDef(OUT_TYPE(ColumnDef, ColumnDef) msg) { - DropStmt *node = makeNode(DropStmt); - READ_LIST_FIELD(objects, objects, objects); - READ_ENUM_FIELD(ObjectType, remove_type, removeType, removeType); - READ_ENUM_FIELD(DropBehavior, behavior, behavior, behavior); - READ_BOOL_FIELD(missing_ok, missing_ok, missing_ok); - READ_BOOL_FIELD(concurrent, concurrent, concurrent); + ColumnDef *node = makeNode(ColumnDef); + READ_STRING_FIELD(colname, colname, colname); + READ_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, type_name, typeName, typeName); + READ_STRING_FIELD(compression, compression, compression); + READ_INT_FIELD(inhcount, inhcount, inhcount); + READ_BOOL_FIELD(is_local, is_local, is_local); + READ_BOOL_FIELD(is_not_null, is_not_null, is_not_null); + READ_BOOL_FIELD(is_from_type, is_from_type, is_from_type); + READ_CHAR_FIELD(storage, storage, storage); + READ_STRING_FIELD(storage_name, storage_name, storage_name); + READ_NODE_PTR_FIELD(raw_default, raw_default, raw_default); + READ_NODE_PTR_FIELD(cooked_default, cooked_default, cooked_default); + READ_CHAR_FIELD(identity, identity, identity); + READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, identity_sequence, identitySequence, identitySequence); + READ_CHAR_FIELD(generated, generated, generated); + READ_SPECIFIC_NODE_PTR_FIELD(CollateClause, collate_clause, coll_clause, collClause, collClause); + READ_UINT_FIELD(coll_oid, collOid, collOid); + READ_LIST_FIELD(constraints, constraints, constraints); + READ_LIST_FIELD(fdwoptions, fdwoptions, fdwoptions); + READ_INT_FIELD(location, location, location); return node; } -static TruncateStmt * -_readTruncateStmt(OUT_TYPE(TruncateStmt, TruncateStmt) msg) +static TableLikeClause * +_readTableLikeClause(OUT_TYPE(TableLikeClause, TableLikeClause) msg) { - TruncateStmt *node = makeNode(TruncateStmt); - READ_LIST_FIELD(relations, relations, relations); - READ_BOOL_FIELD(restart_seqs, restart_seqs, restart_seqs); - READ_ENUM_FIELD(DropBehavior, behavior, behavior, behavior); + TableLikeClause *node = makeNode(TableLikeClause); + READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); + READ_UINT_FIELD(options, options, options); + READ_UINT_FIELD(relation_oid, relationOid, relationOid); return node; } -static CommentStmt * -_readCommentStmt(OUT_TYPE(CommentStmt, CommentStmt) msg) +static IndexElem * +_readIndexElem(OUT_TYPE(IndexElem, IndexElem) msg) { - CommentStmt *node = makeNode(CommentStmt); - READ_ENUM_FIELD(ObjectType, objtype, objtype, objtype); - READ_NODE_PTR_FIELD(object, object, object); - READ_STRING_FIELD(comment, comment, comment); + IndexElem *node = makeNode(IndexElem); + READ_STRING_FIELD(name, name, name); + READ_NODE_PTR_FIELD(expr, expr, expr); + READ_STRING_FIELD(indexcolname, indexcolname, indexcolname); + READ_LIST_FIELD(collation, collation, collation); + READ_LIST_FIELD(opclass, opclass, opclass); + READ_LIST_FIELD(opclassopts, opclassopts, opclassopts); + READ_ENUM_FIELD(SortByDir, ordering, ordering, ordering); + READ_ENUM_FIELD(SortByNulls, nulls_ordering, nulls_ordering, nulls_ordering); return node; } -static FetchStmt * -_readFetchStmt(OUT_TYPE(FetchStmt, FetchStmt) msg) +static DefElem * +_readDefElem(OUT_TYPE(DefElem, DefElem) msg) { - FetchStmt *node = makeNode(FetchStmt); - READ_ENUM_FIELD(FetchDirection, direction, direction, direction); - READ_LONG_FIELD(how_many, howMany, howMany); - READ_STRING_FIELD(portalname, portalname, portalname); - READ_BOOL_FIELD(ismove, ismove, ismove); + DefElem *node = makeNode(DefElem); + READ_STRING_FIELD(defnamespace, defnamespace, defnamespace); + READ_STRING_FIELD(defname, defname, defname); + READ_NODE_PTR_FIELD(arg, arg, arg); + READ_ENUM_FIELD(DefElemAction, defaction, defaction, defaction); + READ_INT_FIELD(location, location, location); return node; } -static IndexStmt * -_readIndexStmt(OUT_TYPE(IndexStmt, IndexStmt) msg) +static LockingClause * +_readLockingClause(OUT_TYPE(LockingClause, LockingClause) msg) { - IndexStmt *node = makeNode(IndexStmt); - READ_STRING_FIELD(idxname, idxname, idxname); - READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); - READ_STRING_FIELD(access_method, accessMethod, accessMethod); - READ_STRING_FIELD(table_space, tableSpace, tableSpace); - READ_LIST_FIELD(index_params, indexParams, indexParams); - READ_LIST_FIELD(index_including_params, indexIncludingParams, indexIncludingParams); - READ_LIST_FIELD(options, options, options); - READ_NODE_PTR_FIELD(where_clause, whereClause, whereClause); - READ_LIST_FIELD(exclude_op_names, excludeOpNames, excludeOpNames); - READ_STRING_FIELD(idxcomment, idxcomment, idxcomment); - READ_UINT_FIELD(index_oid, indexOid, indexOid); - READ_UINT_FIELD(old_node, oldNode, oldNode); - READ_UINT_FIELD(old_create_subid, oldCreateSubid, oldCreateSubid); - READ_UINT_FIELD(old_first_relfilenode_subid, oldFirstRelfilenodeSubid, oldFirstRelfilenodeSubid); - READ_BOOL_FIELD(unique, unique, unique); - READ_BOOL_FIELD(nulls_not_distinct, nulls_not_distinct, nulls_not_distinct); - READ_BOOL_FIELD(primary, primary, primary); - READ_BOOL_FIELD(isconstraint, isconstraint, isconstraint); - READ_BOOL_FIELD(deferrable, deferrable, deferrable); - READ_BOOL_FIELD(initdeferred, initdeferred, initdeferred); - READ_BOOL_FIELD(transformed, transformed, transformed); + LockingClause *node = makeNode(LockingClause); + READ_LIST_FIELD(locked_rels, lockedRels, lockedRels); + READ_ENUM_FIELD(LockClauseStrength, strength, strength, strength); + READ_ENUM_FIELD(LockWaitPolicy, wait_policy, waitPolicy, waitPolicy); + return node; +} + +static XmlSerialize * +_readXmlSerialize(OUT_TYPE(XmlSerialize, XmlSerialize) msg) +{ + XmlSerialize *node = makeNode(XmlSerialize); + READ_ENUM_FIELD(XmlOptionType, xmloption, xmloption, xmloption); + READ_NODE_PTR_FIELD(expr, expr, expr); + READ_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, type_name, typeName, typeName); + READ_BOOL_FIELD(indent, indent, indent); + READ_INT_FIELD(location, location, location); + return node; +} + +static PartitionElem * +_readPartitionElem(OUT_TYPE(PartitionElem, PartitionElem) msg) +{ + PartitionElem *node = makeNode(PartitionElem); + READ_STRING_FIELD(name, name, name); + READ_NODE_PTR_FIELD(expr, expr, expr); + READ_LIST_FIELD(collation, collation, collation); + READ_LIST_FIELD(opclass, opclass, opclass); + READ_INT_FIELD(location, location, location); + return node; +} + +static PartitionSpec * +_readPartitionSpec(OUT_TYPE(PartitionSpec, PartitionSpec) msg) +{ + PartitionSpec *node = makeNode(PartitionSpec); + READ_ENUM_FIELD(PartitionStrategy, strategy, strategy, strategy); + READ_LIST_FIELD(part_params, partParams, partParams); + READ_INT_FIELD(location, location, location); + return node; +} + +static PartitionBoundSpec * +_readPartitionBoundSpec(OUT_TYPE(PartitionBoundSpec, PartitionBoundSpec) msg) +{ + PartitionBoundSpec *node = makeNode(PartitionBoundSpec); + READ_CHAR_FIELD(strategy, strategy, strategy); + READ_BOOL_FIELD(is_default, is_default, is_default); + READ_INT_FIELD(modulus, modulus, modulus); + READ_INT_FIELD(remainder, remainder, remainder); + READ_LIST_FIELD(listdatums, listdatums, listdatums); + READ_LIST_FIELD(lowerdatums, lowerdatums, lowerdatums); + READ_LIST_FIELD(upperdatums, upperdatums, upperdatums); + READ_INT_FIELD(location, location, location); + return node; +} + +static PartitionRangeDatum * +_readPartitionRangeDatum(OUT_TYPE(PartitionRangeDatum, PartitionRangeDatum) msg) +{ + PartitionRangeDatum *node = makeNode(PartitionRangeDatum); + READ_ENUM_FIELD(PartitionRangeDatumKind, kind, kind, kind); + READ_NODE_PTR_FIELD(value, value, value); + READ_INT_FIELD(location, location, location); + return node; +} + +static PartitionCmd * +_readPartitionCmd(OUT_TYPE(PartitionCmd, PartitionCmd) msg) +{ + PartitionCmd *node = makeNode(PartitionCmd); + READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, name, name, name); + READ_SPECIFIC_NODE_PTR_FIELD(PartitionBoundSpec, partition_bound_spec, bound, bound, bound); READ_BOOL_FIELD(concurrent, concurrent, concurrent); - READ_BOOL_FIELD(if_not_exists, if_not_exists, if_not_exists); - READ_BOOL_FIELD(reset_default_tblspc, reset_default_tblspc, reset_default_tblspc); return node; } -static CreateFunctionStmt * -_readCreateFunctionStmt(OUT_TYPE(CreateFunctionStmt, CreateFunctionStmt) msg) +static RangeTblEntry * +_readRangeTblEntry(OUT_TYPE(RangeTblEntry, RangeTblEntry) msg) { - CreateFunctionStmt *node = makeNode(CreateFunctionStmt); - READ_BOOL_FIELD(is_procedure, is_procedure, is_procedure); - READ_BOOL_FIELD(replace, replace, replace); - READ_LIST_FIELD(funcname, funcname, funcname); - READ_LIST_FIELD(parameters, parameters, parameters); - READ_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, return_type, returnType, returnType); - READ_LIST_FIELD(options, options, options); - READ_NODE_PTR_FIELD(sql_body, sql_body, sql_body); + RangeTblEntry *node = makeNode(RangeTblEntry); + READ_ENUM_FIELD(RTEKind, rtekind, rtekind, rtekind); + READ_UINT_FIELD(relid, relid, relid); + READ_CHAR_FIELD(relkind, relkind, relkind); + READ_INT_FIELD(rellockmode, rellockmode, rellockmode); + READ_SPECIFIC_NODE_PTR_FIELD(TableSampleClause, table_sample_clause, tablesample, tablesample, tablesample); + READ_UINT_FIELD(perminfoindex, perminfoindex, perminfoindex); + READ_SPECIFIC_NODE_PTR_FIELD(Query, query, subquery, subquery, subquery); + READ_BOOL_FIELD(security_barrier, security_barrier, security_barrier); + READ_ENUM_FIELD(JoinType, jointype, jointype, jointype); + READ_INT_FIELD(joinmergedcols, joinmergedcols, joinmergedcols); + READ_LIST_FIELD(joinaliasvars, joinaliasvars, joinaliasvars); + READ_LIST_FIELD(joinleftcols, joinleftcols, joinleftcols); + READ_LIST_FIELD(joinrightcols, joinrightcols, joinrightcols); + READ_SPECIFIC_NODE_PTR_FIELD(Alias, alias, join_using_alias, join_using_alias, join_using_alias); + READ_LIST_FIELD(functions, functions, functions); + READ_BOOL_FIELD(funcordinality, funcordinality, funcordinality); + READ_SPECIFIC_NODE_PTR_FIELD(TableFunc, table_func, tablefunc, tablefunc, tablefunc); + READ_LIST_FIELD(values_lists, values_lists, values_lists); + READ_STRING_FIELD(ctename, ctename, ctename); + READ_UINT_FIELD(ctelevelsup, ctelevelsup, ctelevelsup); + READ_BOOL_FIELD(self_reference, self_reference, self_reference); + READ_LIST_FIELD(coltypes, coltypes, coltypes); + READ_LIST_FIELD(coltypmods, coltypmods, coltypmods); + READ_LIST_FIELD(colcollations, colcollations, colcollations); + READ_STRING_FIELD(enrname, enrname, enrname); + READ_FLOAT_FIELD(enrtuples, enrtuples, enrtuples); + READ_SPECIFIC_NODE_PTR_FIELD(Alias, alias, alias, alias, alias); + READ_SPECIFIC_NODE_PTR_FIELD(Alias, alias, eref, eref, eref); + READ_BOOL_FIELD(lateral, lateral, lateral); + READ_BOOL_FIELD(inh, inh, inh); + READ_BOOL_FIELD(in_from_cl, inFromCl, inFromCl); + READ_LIST_FIELD(security_quals, securityQuals, securityQuals); return node; } -static AlterFunctionStmt * -_readAlterFunctionStmt(OUT_TYPE(AlterFunctionStmt, AlterFunctionStmt) msg) +static RTEPermissionInfo * +_readRTEPermissionInfo(OUT_TYPE(RTEPermissionInfo, RTEPermissionInfo) msg) { - AlterFunctionStmt *node = makeNode(AlterFunctionStmt); - READ_ENUM_FIELD(ObjectType, objtype, objtype, objtype); - READ_SPECIFIC_NODE_PTR_FIELD(ObjectWithArgs, object_with_args, func, func, func); - READ_LIST_FIELD(actions, actions, actions); + RTEPermissionInfo *node = makeNode(RTEPermissionInfo); + READ_UINT_FIELD(relid, relid, relid); + READ_BOOL_FIELD(inh, inh, inh); + READ_LONG_FIELD(required_perms, requiredPerms, requiredPerms); + READ_UINT_FIELD(check_as_user, checkAsUser, checkAsUser); + READ_BITMAPSET_FIELD(selected_cols, selectedCols, selectedCols); + READ_BITMAPSET_FIELD(inserted_cols, insertedCols, insertedCols); + READ_BITMAPSET_FIELD(updated_cols, updatedCols, updatedCols); return node; } -static DoStmt * -_readDoStmt(OUT_TYPE(DoStmt, DoStmt) msg) +static RangeTblFunction * +_readRangeTblFunction(OUT_TYPE(RangeTblFunction, RangeTblFunction) msg) { - DoStmt *node = makeNode(DoStmt); + RangeTblFunction *node = makeNode(RangeTblFunction); + READ_NODE_PTR_FIELD(funcexpr, funcexpr, funcexpr); + READ_INT_FIELD(funccolcount, funccolcount, funccolcount); + READ_LIST_FIELD(funccolnames, funccolnames, funccolnames); + READ_LIST_FIELD(funccoltypes, funccoltypes, funccoltypes); + READ_LIST_FIELD(funccoltypmods, funccoltypmods, funccoltypmods); + READ_LIST_FIELD(funccolcollations, funccolcollations, funccolcollations); + READ_BITMAPSET_FIELD(funcparams, funcparams, funcparams); + return node; +} + +static TableSampleClause * +_readTableSampleClause(OUT_TYPE(TableSampleClause, TableSampleClause) msg) +{ + TableSampleClause *node = makeNode(TableSampleClause); + READ_UINT_FIELD(tsmhandler, tsmhandler, tsmhandler); READ_LIST_FIELD(args, args, args); + READ_EXPR_PTR_FIELD(repeatable, repeatable, repeatable); return node; } -static RenameStmt * -_readRenameStmt(OUT_TYPE(RenameStmt, RenameStmt) msg) +static WithCheckOption * +_readWithCheckOption(OUT_TYPE(WithCheckOption, WithCheckOption) msg) { - RenameStmt *node = makeNode(RenameStmt); - READ_ENUM_FIELD(ObjectType, rename_type, renameType, renameType); - READ_ENUM_FIELD(ObjectType, relation_type, relationType, relationType); - READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); - READ_NODE_PTR_FIELD(object, object, object); - READ_STRING_FIELD(subname, subname, subname); - READ_STRING_FIELD(newname, newname, newname); - READ_ENUM_FIELD(DropBehavior, behavior, behavior, behavior); - READ_BOOL_FIELD(missing_ok, missing_ok, missing_ok); + WithCheckOption *node = makeNode(WithCheckOption); + READ_ENUM_FIELD(WCOKind, kind, kind, kind); + READ_STRING_FIELD(relname, relname, relname); + READ_STRING_FIELD(polname, polname, polname); + READ_NODE_PTR_FIELD(qual, qual, qual); + READ_BOOL_FIELD(cascaded, cascaded, cascaded); return node; } -static RuleStmt * -_readRuleStmt(OUT_TYPE(RuleStmt, RuleStmt) msg) +static SortGroupClause * +_readSortGroupClause(OUT_TYPE(SortGroupClause, SortGroupClause) msg) { - RuleStmt *node = makeNode(RuleStmt); - READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); - READ_STRING_FIELD(rulename, rulename, rulename); - READ_NODE_PTR_FIELD(where_clause, whereClause, whereClause); - READ_ENUM_FIELD(CmdType, event, event, event); - READ_BOOL_FIELD(instead, instead, instead); - READ_LIST_FIELD(actions, actions, actions); - READ_BOOL_FIELD(replace, replace, replace); + SortGroupClause *node = makeNode(SortGroupClause); + READ_UINT_FIELD(tle_sort_group_ref, tleSortGroupRef, tleSortGroupRef); + READ_UINT_FIELD(eqop, eqop, eqop); + READ_UINT_FIELD(sortop, sortop, sortop); + READ_BOOL_FIELD(nulls_first, nulls_first, nulls_first); + READ_BOOL_FIELD(hashable, hashable, hashable); + return node; +} + +static GroupingSet * +_readGroupingSet(OUT_TYPE(GroupingSet, GroupingSet) msg) +{ + GroupingSet *node = makeNode(GroupingSet); + READ_ENUM_FIELD(GroupingSetKind, kind, kind, kind); + READ_LIST_FIELD(content, content, content); + READ_INT_FIELD(location, location, location); + return node; +} + +static WindowClause * +_readWindowClause(OUT_TYPE(WindowClause, WindowClause) msg) +{ + WindowClause *node = makeNode(WindowClause); + READ_STRING_FIELD(name, name, name); + READ_STRING_FIELD(refname, refname, refname); + READ_LIST_FIELD(partition_clause, partitionClause, partitionClause); + READ_LIST_FIELD(order_clause, orderClause, orderClause); + READ_INT_FIELD(frame_options, frameOptions, frameOptions); + READ_NODE_PTR_FIELD(start_offset, startOffset, startOffset); + READ_NODE_PTR_FIELD(end_offset, endOffset, endOffset); + READ_LIST_FIELD(run_condition, runCondition, runCondition); + READ_UINT_FIELD(start_in_range_func, startInRangeFunc, startInRangeFunc); + READ_UINT_FIELD(end_in_range_func, endInRangeFunc, endInRangeFunc); + READ_UINT_FIELD(in_range_coll, inRangeColl, inRangeColl); + READ_BOOL_FIELD(in_range_asc, inRangeAsc, inRangeAsc); + READ_BOOL_FIELD(in_range_nulls_first, inRangeNullsFirst, inRangeNullsFirst); + READ_UINT_FIELD(winref, winref, winref); + READ_BOOL_FIELD(copied_order, copiedOrder, copiedOrder); return node; } -static NotifyStmt * -_readNotifyStmt(OUT_TYPE(NotifyStmt, NotifyStmt) msg) +static RowMarkClause * +_readRowMarkClause(OUT_TYPE(RowMarkClause, RowMarkClause) msg) { - NotifyStmt *node = makeNode(NotifyStmt); - READ_STRING_FIELD(conditionname, conditionname, conditionname); - READ_STRING_FIELD(payload, payload, payload); + RowMarkClause *node = makeNode(RowMarkClause); + READ_UINT_FIELD(rti, rti, rti); + READ_ENUM_FIELD(LockClauseStrength, strength, strength, strength); + READ_ENUM_FIELD(LockWaitPolicy, wait_policy, waitPolicy, waitPolicy); + READ_BOOL_FIELD(pushed_down, pushedDown, pushedDown); return node; } -static ListenStmt * -_readListenStmt(OUT_TYPE(ListenStmt, ListenStmt) msg) +static WithClause * +_readWithClause(OUT_TYPE(WithClause, WithClause) msg) { - ListenStmt *node = makeNode(ListenStmt); - READ_STRING_FIELD(conditionname, conditionname, conditionname); + WithClause *node = makeNode(WithClause); + READ_LIST_FIELD(ctes, ctes, ctes); + READ_BOOL_FIELD(recursive, recursive, recursive); + READ_INT_FIELD(location, location, location); return node; } -static UnlistenStmt * -_readUnlistenStmt(OUT_TYPE(UnlistenStmt, UnlistenStmt) msg) +static InferClause * +_readInferClause(OUT_TYPE(InferClause, InferClause) msg) { - UnlistenStmt *node = makeNode(UnlistenStmt); - READ_STRING_FIELD(conditionname, conditionname, conditionname); + InferClause *node = makeNode(InferClause); + READ_LIST_FIELD(index_elems, indexElems, indexElems); + READ_NODE_PTR_FIELD(where_clause, whereClause, whereClause); + READ_STRING_FIELD(conname, conname, conname); + READ_INT_FIELD(location, location, location); return node; } -static TransactionStmt * -_readTransactionStmt(OUT_TYPE(TransactionStmt, TransactionStmt) msg) +static OnConflictClause * +_readOnConflictClause(OUT_TYPE(OnConflictClause, OnConflictClause) msg) { - TransactionStmt *node = makeNode(TransactionStmt); - READ_ENUM_FIELD(TransactionStmtKind, kind, kind, kind); - READ_LIST_FIELD(options, options, options); - READ_STRING_FIELD(savepoint_name, savepoint_name, savepoint_name); - READ_STRING_FIELD(gid, gid, gid); - READ_BOOL_FIELD(chain, chain, chain); + OnConflictClause *node = makeNode(OnConflictClause); + READ_ENUM_FIELD(OnConflictAction, action, action, action); + READ_SPECIFIC_NODE_PTR_FIELD(InferClause, infer_clause, infer, infer, infer); + READ_LIST_FIELD(target_list, targetList, targetList); + READ_NODE_PTR_FIELD(where_clause, whereClause, whereClause); + READ_INT_FIELD(location, location, location); return node; } -static ViewStmt * -_readViewStmt(OUT_TYPE(ViewStmt, ViewStmt) msg) +static CTESearchClause * +_readCTESearchClause(OUT_TYPE(CTESearchClause, CTESearchClause) msg) { - ViewStmt *node = makeNode(ViewStmt); - READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, view, view, view); - READ_LIST_FIELD(aliases, aliases, aliases); - READ_NODE_PTR_FIELD(query, query, query); - READ_BOOL_FIELD(replace, replace, replace); - READ_LIST_FIELD(options, options, options); - READ_ENUM_FIELD(ViewCheckOption, with_check_option, withCheckOption, withCheckOption); + CTESearchClause *node = makeNode(CTESearchClause); + READ_LIST_FIELD(search_col_list, search_col_list, search_col_list); + READ_BOOL_FIELD(search_breadth_first, search_breadth_first, search_breadth_first); + READ_STRING_FIELD(search_seq_column, search_seq_column, search_seq_column); + READ_INT_FIELD(location, location, location); return node; } -static LoadStmt * -_readLoadStmt(OUT_TYPE(LoadStmt, LoadStmt) msg) +static CTECycleClause * +_readCTECycleClause(OUT_TYPE(CTECycleClause, CTECycleClause) msg) { - LoadStmt *node = makeNode(LoadStmt); - READ_STRING_FIELD(filename, filename, filename); + CTECycleClause *node = makeNode(CTECycleClause); + READ_LIST_FIELD(cycle_col_list, cycle_col_list, cycle_col_list); + READ_STRING_FIELD(cycle_mark_column, cycle_mark_column, cycle_mark_column); + READ_NODE_PTR_FIELD(cycle_mark_value, cycle_mark_value, cycle_mark_value); + READ_NODE_PTR_FIELD(cycle_mark_default, cycle_mark_default, cycle_mark_default); + READ_STRING_FIELD(cycle_path_column, cycle_path_column, cycle_path_column); + READ_INT_FIELD(location, location, location); + READ_UINT_FIELD(cycle_mark_type, cycle_mark_type, cycle_mark_type); + READ_INT_FIELD(cycle_mark_typmod, cycle_mark_typmod, cycle_mark_typmod); + READ_UINT_FIELD(cycle_mark_collation, cycle_mark_collation, cycle_mark_collation); + READ_UINT_FIELD(cycle_mark_neop, cycle_mark_neop, cycle_mark_neop); return node; } -static CreateDomainStmt * -_readCreateDomainStmt(OUT_TYPE(CreateDomainStmt, CreateDomainStmt) msg) +static CommonTableExpr * +_readCommonTableExpr(OUT_TYPE(CommonTableExpr, CommonTableExpr) msg) { - CreateDomainStmt *node = makeNode(CreateDomainStmt); - READ_LIST_FIELD(domainname, domainname, domainname); - READ_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, type_name, typeName, typeName); - READ_SPECIFIC_NODE_PTR_FIELD(CollateClause, collate_clause, coll_clause, collClause, collClause); - READ_LIST_FIELD(constraints, constraints, constraints); + CommonTableExpr *node = makeNode(CommonTableExpr); + READ_STRING_FIELD(ctename, ctename, ctename); + READ_LIST_FIELD(aliascolnames, aliascolnames, aliascolnames); + READ_ENUM_FIELD(CTEMaterialize, ctematerialized, ctematerialized, ctematerialized); + READ_NODE_PTR_FIELD(ctequery, ctequery, ctequery); + READ_SPECIFIC_NODE_PTR_FIELD(CTESearchClause, ctesearch_clause, search_clause, search_clause, search_clause); + READ_SPECIFIC_NODE_PTR_FIELD(CTECycleClause, ctecycle_clause, cycle_clause, cycle_clause, cycle_clause); + READ_INT_FIELD(location, location, location); + READ_BOOL_FIELD(cterecursive, cterecursive, cterecursive); + READ_INT_FIELD(cterefcount, cterefcount, cterefcount); + READ_LIST_FIELD(ctecolnames, ctecolnames, ctecolnames); + READ_LIST_FIELD(ctecoltypes, ctecoltypes, ctecoltypes); + READ_LIST_FIELD(ctecoltypmods, ctecoltypmods, ctecoltypmods); + READ_LIST_FIELD(ctecolcollations, ctecolcollations, ctecolcollations); return node; } -static CreatedbStmt * -_readCreatedbStmt(OUT_TYPE(CreatedbStmt, CreatedbStmt) msg) +static MergeWhenClause * +_readMergeWhenClause(OUT_TYPE(MergeWhenClause, MergeWhenClause) msg) { - CreatedbStmt *node = makeNode(CreatedbStmt); - READ_STRING_FIELD(dbname, dbname, dbname); - READ_LIST_FIELD(options, options, options); + MergeWhenClause *node = makeNode(MergeWhenClause); + READ_BOOL_FIELD(matched, matched, matched); + READ_ENUM_FIELD(CmdType, command_type, commandType, commandType); + READ_ENUM_FIELD(OverridingKind, override, override, override); + READ_NODE_PTR_FIELD(condition, condition, condition); + READ_LIST_FIELD(target_list, targetList, targetList); + READ_LIST_FIELD(values, values, values); return node; } -static DropdbStmt * -_readDropdbStmt(OUT_TYPE(DropdbStmt, DropdbStmt) msg) +static MergeAction * +_readMergeAction(OUT_TYPE(MergeAction, MergeAction) msg) { - DropdbStmt *node = makeNode(DropdbStmt); - READ_STRING_FIELD(dbname, dbname, dbname); - READ_BOOL_FIELD(missing_ok, missing_ok, missing_ok); - READ_LIST_FIELD(options, options, options); + MergeAction *node = makeNode(MergeAction); + READ_BOOL_FIELD(matched, matched, matched); + READ_ENUM_FIELD(CmdType, command_type, commandType, commandType); + READ_ENUM_FIELD(OverridingKind, override, override, override); + READ_NODE_PTR_FIELD(qual, qual, qual); + READ_LIST_FIELD(target_list, targetList, targetList); + READ_LIST_FIELD(update_colnos, updateColnos, updateColnos); return node; } -static VacuumStmt * -_readVacuumStmt(OUT_TYPE(VacuumStmt, VacuumStmt) msg) +static TriggerTransition * +_readTriggerTransition(OUT_TYPE(TriggerTransition, TriggerTransition) msg) { - VacuumStmt *node = makeNode(VacuumStmt); - READ_LIST_FIELD(options, options, options); - READ_LIST_FIELD(rels, rels, rels); - READ_BOOL_FIELD(is_vacuumcmd, is_vacuumcmd, is_vacuumcmd); + TriggerTransition *node = makeNode(TriggerTransition); + READ_STRING_FIELD(name, name, name); + READ_BOOL_FIELD(is_new, isNew, isNew); + READ_BOOL_FIELD(is_table, isTable, isTable); return node; } -static ExplainStmt * -_readExplainStmt(OUT_TYPE(ExplainStmt, ExplainStmt) msg) +static JsonOutput * +_readJsonOutput(OUT_TYPE(JsonOutput, JsonOutput) msg) { - ExplainStmt *node = makeNode(ExplainStmt); - READ_NODE_PTR_FIELD(query, query, query); - READ_LIST_FIELD(options, options, options); + JsonOutput *node = makeNode(JsonOutput); + READ_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, type_name, typeName, typeName); + READ_SPECIFIC_NODE_PTR_FIELD(JsonReturning, json_returning, returning, returning, returning); return node; } -static CreateTableAsStmt * -_readCreateTableAsStmt(OUT_TYPE(CreateTableAsStmt, CreateTableAsStmt) msg) +static JsonKeyValue * +_readJsonKeyValue(OUT_TYPE(JsonKeyValue, JsonKeyValue) msg) { - CreateTableAsStmt *node = makeNode(CreateTableAsStmt); - READ_NODE_PTR_FIELD(query, query, query); - READ_SPECIFIC_NODE_PTR_FIELD(IntoClause, into_clause, into, into, into); - READ_ENUM_FIELD(ObjectType, objtype, objtype, objtype); - READ_BOOL_FIELD(is_select_into, is_select_into, is_select_into); - READ_BOOL_FIELD(if_not_exists, if_not_exists, if_not_exists); + JsonKeyValue *node = makeNode(JsonKeyValue); + READ_EXPR_PTR_FIELD(key, key, key); + READ_SPECIFIC_NODE_PTR_FIELD(JsonValueExpr, json_value_expr, value, value, value); return node; } -static CreateSeqStmt * -_readCreateSeqStmt(OUT_TYPE(CreateSeqStmt, CreateSeqStmt) msg) +static JsonObjectConstructor * +_readJsonObjectConstructor(OUT_TYPE(JsonObjectConstructor, JsonObjectConstructor) msg) { - CreateSeqStmt *node = makeNode(CreateSeqStmt); - READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, sequence, sequence, sequence); - READ_LIST_FIELD(options, options, options); - READ_UINT_FIELD(owner_id, ownerId, ownerId); - READ_BOOL_FIELD(for_identity, for_identity, for_identity); - READ_BOOL_FIELD(if_not_exists, if_not_exists, if_not_exists); + JsonObjectConstructor *node = makeNode(JsonObjectConstructor); + READ_LIST_FIELD(exprs, exprs, exprs); + READ_SPECIFIC_NODE_PTR_FIELD(JsonOutput, json_output, output, output, output); + READ_BOOL_FIELD(absent_on_null, absent_on_null, absent_on_null); + READ_BOOL_FIELD(unique, unique, unique); + READ_INT_FIELD(location, location, location); return node; } -static AlterSeqStmt * -_readAlterSeqStmt(OUT_TYPE(AlterSeqStmt, AlterSeqStmt) msg) +static JsonArrayConstructor * +_readJsonArrayConstructor(OUT_TYPE(JsonArrayConstructor, JsonArrayConstructor) msg) { - AlterSeqStmt *node = makeNode(AlterSeqStmt); - READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, sequence, sequence, sequence); - READ_LIST_FIELD(options, options, options); - READ_BOOL_FIELD(for_identity, for_identity, for_identity); - READ_BOOL_FIELD(missing_ok, missing_ok, missing_ok); + JsonArrayConstructor *node = makeNode(JsonArrayConstructor); + READ_LIST_FIELD(exprs, exprs, exprs); + READ_SPECIFIC_NODE_PTR_FIELD(JsonOutput, json_output, output, output, output); + READ_BOOL_FIELD(absent_on_null, absent_on_null, absent_on_null); + READ_INT_FIELD(location, location, location); return node; } -static VariableSetStmt * -_readVariableSetStmt(OUT_TYPE(VariableSetStmt, VariableSetStmt) msg) +static JsonArrayQueryConstructor * +_readJsonArrayQueryConstructor(OUT_TYPE(JsonArrayQueryConstructor, JsonArrayQueryConstructor) msg) { - VariableSetStmt *node = makeNode(VariableSetStmt); - READ_ENUM_FIELD(VariableSetKind, kind, kind, kind); - READ_STRING_FIELD(name, name, name); - READ_LIST_FIELD(args, args, args); - READ_BOOL_FIELD(is_local, is_local, is_local); + JsonArrayQueryConstructor *node = makeNode(JsonArrayQueryConstructor); + READ_NODE_PTR_FIELD(query, query, query); + READ_SPECIFIC_NODE_PTR_FIELD(JsonOutput, json_output, output, output, output); + READ_SPECIFIC_NODE_PTR_FIELD(JsonFormat, json_format, format, format, format); + READ_BOOL_FIELD(absent_on_null, absent_on_null, absent_on_null); + READ_INT_FIELD(location, location, location); return node; } -static VariableShowStmt * -_readVariableShowStmt(OUT_TYPE(VariableShowStmt, VariableShowStmt) msg) +static JsonAggConstructor * +_readJsonAggConstructor(OUT_TYPE(JsonAggConstructor, JsonAggConstructor) msg) { - VariableShowStmt *node = makeNode(VariableShowStmt); - READ_STRING_FIELD(name, name, name); + JsonAggConstructor *node = makeNode(JsonAggConstructor); + READ_SPECIFIC_NODE_PTR_FIELD(JsonOutput, json_output, output, output, output); + READ_NODE_PTR_FIELD(agg_filter, agg_filter, agg_filter); + READ_LIST_FIELD(agg_order, agg_order, agg_order); + READ_SPECIFIC_NODE_PTR_FIELD(WindowDef, window_def, over, over, over); + READ_INT_FIELD(location, location, location); return node; } -static DiscardStmt * -_readDiscardStmt(OUT_TYPE(DiscardStmt, DiscardStmt) msg) +static JsonObjectAgg * +_readJsonObjectAgg(OUT_TYPE(JsonObjectAgg, JsonObjectAgg) msg) { - DiscardStmt *node = makeNode(DiscardStmt); - READ_ENUM_FIELD(DiscardMode, target, target, target); + JsonObjectAgg *node = makeNode(JsonObjectAgg); + READ_SPECIFIC_NODE_PTR_FIELD(JsonAggConstructor, json_agg_constructor, constructor, constructor, constructor); + READ_SPECIFIC_NODE_PTR_FIELD(JsonKeyValue, json_key_value, arg, arg, arg); + READ_BOOL_FIELD(absent_on_null, absent_on_null, absent_on_null); + READ_BOOL_FIELD(unique, unique, unique); return node; } -static CreateTrigStmt * -_readCreateTrigStmt(OUT_TYPE(CreateTrigStmt, CreateTrigStmt) msg) +static JsonArrayAgg * +_readJsonArrayAgg(OUT_TYPE(JsonArrayAgg, JsonArrayAgg) msg) { - CreateTrigStmt *node = makeNode(CreateTrigStmt); - READ_BOOL_FIELD(replace, replace, replace); - READ_BOOL_FIELD(isconstraint, isconstraint, isconstraint); - READ_STRING_FIELD(trigname, trigname, trigname); - READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); - READ_LIST_FIELD(funcname, funcname, funcname); - READ_LIST_FIELD(args, args, args); - READ_BOOL_FIELD(row, row, row); - READ_INT_FIELD(timing, timing, timing); - READ_INT_FIELD(events, events, events); - READ_LIST_FIELD(columns, columns, columns); - READ_NODE_PTR_FIELD(when_clause, whenClause, whenClause); - READ_LIST_FIELD(transition_rels, transitionRels, transitionRels); - READ_BOOL_FIELD(deferrable, deferrable, deferrable); - READ_BOOL_FIELD(initdeferred, initdeferred, initdeferred); - READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, constrrel, constrrel, constrrel); + JsonArrayAgg *node = makeNode(JsonArrayAgg); + READ_SPECIFIC_NODE_PTR_FIELD(JsonAggConstructor, json_agg_constructor, constructor, constructor, constructor); + READ_SPECIFIC_NODE_PTR_FIELD(JsonValueExpr, json_value_expr, arg, arg, arg); + READ_BOOL_FIELD(absent_on_null, absent_on_null, absent_on_null); return node; } -static CreatePLangStmt * -_readCreatePLangStmt(OUT_TYPE(CreatePLangStmt, CreatePLangStmt) msg) +static RawStmt * +_readRawStmt(OUT_TYPE(RawStmt, RawStmt) msg) { - CreatePLangStmt *node = makeNode(CreatePLangStmt); - READ_BOOL_FIELD(replace, replace, replace); - READ_STRING_FIELD(plname, plname, plname); - READ_LIST_FIELD(plhandler, plhandler, plhandler); - READ_LIST_FIELD(plinline, plinline, plinline); - READ_LIST_FIELD(plvalidator, plvalidator, plvalidator); - READ_BOOL_FIELD(pltrusted, pltrusted, pltrusted); + RawStmt *node = makeNode(RawStmt); + READ_NODE_PTR_FIELD(stmt, stmt, stmt); + READ_INT_FIELD(stmt_location, stmt_location, stmt_location); + READ_INT_FIELD(stmt_len, stmt_len, stmt_len); return node; } -static CreateRoleStmt * -_readCreateRoleStmt(OUT_TYPE(CreateRoleStmt, CreateRoleStmt) msg) +static InsertStmt * +_readInsertStmt(OUT_TYPE(InsertStmt, InsertStmt) msg) +{ + InsertStmt *node = makeNode(InsertStmt); + READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); + READ_LIST_FIELD(cols, cols, cols); + READ_NODE_PTR_FIELD(select_stmt, selectStmt, selectStmt); + READ_SPECIFIC_NODE_PTR_FIELD(OnConflictClause, on_conflict_clause, on_conflict_clause, onConflictClause, onConflictClause); + READ_LIST_FIELD(returning_list, returningList, returningList); + READ_SPECIFIC_NODE_PTR_FIELD(WithClause, with_clause, with_clause, withClause, withClause); + READ_ENUM_FIELD(OverridingKind, override, override, override); + return node; +} + +static DeleteStmt * +_readDeleteStmt(OUT_TYPE(DeleteStmt, DeleteStmt) msg) { - CreateRoleStmt *node = makeNode(CreateRoleStmt); - READ_ENUM_FIELD(RoleStmtType, stmt_type, stmt_type, stmt_type); - READ_STRING_FIELD(role, role, role); - READ_LIST_FIELD(options, options, options); + DeleteStmt *node = makeNode(DeleteStmt); + READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); + READ_LIST_FIELD(using_clause, usingClause, usingClause); + READ_NODE_PTR_FIELD(where_clause, whereClause, whereClause); + READ_LIST_FIELD(returning_list, returningList, returningList); + READ_SPECIFIC_NODE_PTR_FIELD(WithClause, with_clause, with_clause, withClause, withClause); return node; } -static AlterRoleStmt * -_readAlterRoleStmt(OUT_TYPE(AlterRoleStmt, AlterRoleStmt) msg) +static UpdateStmt * +_readUpdateStmt(OUT_TYPE(UpdateStmt, UpdateStmt) msg) { - AlterRoleStmt *node = makeNode(AlterRoleStmt); - READ_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, role, role, role); - READ_LIST_FIELD(options, options, options); - READ_INT_FIELD(action, action, action); + UpdateStmt *node = makeNode(UpdateStmt); + READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); + READ_LIST_FIELD(target_list, targetList, targetList); + READ_NODE_PTR_FIELD(where_clause, whereClause, whereClause); + READ_LIST_FIELD(from_clause, fromClause, fromClause); + READ_LIST_FIELD(returning_list, returningList, returningList); + READ_SPECIFIC_NODE_PTR_FIELD(WithClause, with_clause, with_clause, withClause, withClause); return node; } -static DropRoleStmt * -_readDropRoleStmt(OUT_TYPE(DropRoleStmt, DropRoleStmt) msg) +static MergeStmt * +_readMergeStmt(OUT_TYPE(MergeStmt, MergeStmt) msg) { - DropRoleStmt *node = makeNode(DropRoleStmt); - READ_LIST_FIELD(roles, roles, roles); - READ_BOOL_FIELD(missing_ok, missing_ok, missing_ok); + MergeStmt *node = makeNode(MergeStmt); + READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); + READ_NODE_PTR_FIELD(source_relation, sourceRelation, sourceRelation); + READ_NODE_PTR_FIELD(join_condition, joinCondition, joinCondition); + READ_LIST_FIELD(merge_when_clauses, mergeWhenClauses, mergeWhenClauses); + READ_SPECIFIC_NODE_PTR_FIELD(WithClause, with_clause, with_clause, withClause, withClause); return node; } -static LockStmt * -_readLockStmt(OUT_TYPE(LockStmt, LockStmt) msg) +static SelectStmt * +_readSelectStmt(OUT_TYPE(SelectStmt, SelectStmt) msg) { - LockStmt *node = makeNode(LockStmt); - READ_LIST_FIELD(relations, relations, relations); - READ_INT_FIELD(mode, mode, mode); - READ_BOOL_FIELD(nowait, nowait, nowait); + SelectStmt *node = makeNode(SelectStmt); + READ_LIST_FIELD(distinct_clause, distinctClause, distinctClause); + READ_SPECIFIC_NODE_PTR_FIELD(IntoClause, into_clause, into_clause, intoClause, intoClause); + READ_LIST_FIELD(target_list, targetList, targetList); + READ_LIST_FIELD(from_clause, fromClause, fromClause); + READ_NODE_PTR_FIELD(where_clause, whereClause, whereClause); + READ_LIST_FIELD(group_clause, groupClause, groupClause); + READ_BOOL_FIELD(group_distinct, groupDistinct, groupDistinct); + READ_NODE_PTR_FIELD(having_clause, havingClause, havingClause); + READ_LIST_FIELD(window_clause, windowClause, windowClause); + READ_LIST_FIELD(values_lists, valuesLists, valuesLists); + READ_LIST_FIELD(sort_clause, sortClause, sortClause); + READ_NODE_PTR_FIELD(limit_offset, limitOffset, limitOffset); + READ_NODE_PTR_FIELD(limit_count, limitCount, limitCount); + READ_ENUM_FIELD(LimitOption, limit_option, limitOption, limitOption); + READ_LIST_FIELD(locking_clause, lockingClause, lockingClause); + READ_SPECIFIC_NODE_PTR_FIELD(WithClause, with_clause, with_clause, withClause, withClause); + READ_ENUM_FIELD(SetOperation, op, op, op); + READ_BOOL_FIELD(all, all, all); + READ_SPECIFIC_NODE_PTR_FIELD(SelectStmt, select_stmt, larg, larg, larg); + READ_SPECIFIC_NODE_PTR_FIELD(SelectStmt, select_stmt, rarg, rarg, rarg); return node; } -static ConstraintsSetStmt * -_readConstraintsSetStmt(OUT_TYPE(ConstraintsSetStmt, ConstraintsSetStmt) msg) +static SetOperationStmt * +_readSetOperationStmt(OUT_TYPE(SetOperationStmt, SetOperationStmt) msg) { - ConstraintsSetStmt *node = makeNode(ConstraintsSetStmt); - READ_LIST_FIELD(constraints, constraints, constraints); - READ_BOOL_FIELD(deferred, deferred, deferred); + SetOperationStmt *node = makeNode(SetOperationStmt); + READ_ENUM_FIELD(SetOperation, op, op, op); + READ_BOOL_FIELD(all, all, all); + READ_NODE_PTR_FIELD(larg, larg, larg); + READ_NODE_PTR_FIELD(rarg, rarg, rarg); + READ_LIST_FIELD(col_types, colTypes, colTypes); + READ_LIST_FIELD(col_typmods, colTypmods, colTypmods); + READ_LIST_FIELD(col_collations, colCollations, colCollations); + READ_LIST_FIELD(group_clauses, groupClauses, groupClauses); return node; } -static ReindexStmt * -_readReindexStmt(OUT_TYPE(ReindexStmt, ReindexStmt) msg) +static ReturnStmt * +_readReturnStmt(OUT_TYPE(ReturnStmt, ReturnStmt) msg) { - ReindexStmt *node = makeNode(ReindexStmt); - READ_ENUM_FIELD(ReindexObjectType, kind, kind, kind); - READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); - READ_STRING_FIELD(name, name, name); - READ_LIST_FIELD(params, params, params); + ReturnStmt *node = makeNode(ReturnStmt); + READ_NODE_PTR_FIELD(returnval, returnval, returnval); return node; } -static CheckPointStmt * -_readCheckPointStmt(OUT_TYPE(CheckPointStmt, CheckPointStmt) msg) +static PLAssignStmt * +_readPLAssignStmt(OUT_TYPE(PLAssignStmt, PLAssignStmt) msg) { - CheckPointStmt *node = makeNode(CheckPointStmt); + PLAssignStmt *node = makeNode(PLAssignStmt); + READ_STRING_FIELD(name, name, name); + READ_LIST_FIELD(indirection, indirection, indirection); + READ_INT_FIELD(nnames, nnames, nnames); + READ_SPECIFIC_NODE_PTR_FIELD(SelectStmt, select_stmt, val, val, val); + READ_INT_FIELD(location, location, location); return node; } @@ -1624,133 +1855,207 @@ _readCreateSchemaStmt(OUT_TYPE(CreateSchemaStmt, CreateSchemaStmt) msg) return node; } -static AlterDatabaseStmt * -_readAlterDatabaseStmt(OUT_TYPE(AlterDatabaseStmt, AlterDatabaseStmt) msg) +static AlterTableStmt * +_readAlterTableStmt(OUT_TYPE(AlterTableStmt, AlterTableStmt) msg) { - AlterDatabaseStmt *node = makeNode(AlterDatabaseStmt); - READ_STRING_FIELD(dbname, dbname, dbname); - READ_LIST_FIELD(options, options, options); + AlterTableStmt *node = makeNode(AlterTableStmt); + READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); + READ_LIST_FIELD(cmds, cmds, cmds); + READ_ENUM_FIELD(ObjectType, objtype, objtype, objtype); + READ_BOOL_FIELD(missing_ok, missing_ok, missing_ok); return node; } -static AlterDatabaseRefreshCollStmt * -_readAlterDatabaseRefreshCollStmt(OUT_TYPE(AlterDatabaseRefreshCollStmt, AlterDatabaseRefreshCollStmt) msg) +static ReplicaIdentityStmt * +_readReplicaIdentityStmt(OUT_TYPE(ReplicaIdentityStmt, ReplicaIdentityStmt) msg) { - AlterDatabaseRefreshCollStmt *node = makeNode(AlterDatabaseRefreshCollStmt); - READ_STRING_FIELD(dbname, dbname, dbname); + ReplicaIdentityStmt *node = makeNode(ReplicaIdentityStmt); + READ_CHAR_FIELD(identity_type, identity_type, identity_type); + READ_STRING_FIELD(name, name, name); return node; } -static AlterDatabaseSetStmt * -_readAlterDatabaseSetStmt(OUT_TYPE(AlterDatabaseSetStmt, AlterDatabaseSetStmt) msg) +static AlterTableCmd * +_readAlterTableCmd(OUT_TYPE(AlterTableCmd, AlterTableCmd) msg) { - AlterDatabaseSetStmt *node = makeNode(AlterDatabaseSetStmt); - READ_STRING_FIELD(dbname, dbname, dbname); - READ_SPECIFIC_NODE_PTR_FIELD(VariableSetStmt, variable_set_stmt, setstmt, setstmt, setstmt); + AlterTableCmd *node = makeNode(AlterTableCmd); + READ_ENUM_FIELD(AlterTableType, subtype, subtype, subtype); + READ_STRING_FIELD(name, name, name); + READ_INT_FIELD(num, num, num); + READ_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, newowner, newowner, newowner); + READ_NODE_PTR_FIELD(def, def, def); + READ_ENUM_FIELD(DropBehavior, behavior, behavior, behavior); + READ_BOOL_FIELD(missing_ok, missing_ok, missing_ok); + READ_BOOL_FIELD(recurse, recurse, recurse); return node; } -static AlterRoleSetStmt * -_readAlterRoleSetStmt(OUT_TYPE(AlterRoleSetStmt, AlterRoleSetStmt) msg) +static AlterCollationStmt * +_readAlterCollationStmt(OUT_TYPE(AlterCollationStmt, AlterCollationStmt) msg) { - AlterRoleSetStmt *node = makeNode(AlterRoleSetStmt); - READ_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, role, role, role); - READ_STRING_FIELD(database, database, database); - READ_SPECIFIC_NODE_PTR_FIELD(VariableSetStmt, variable_set_stmt, setstmt, setstmt, setstmt); + AlterCollationStmt *node = makeNode(AlterCollationStmt); + READ_LIST_FIELD(collname, collname, collname); return node; } -static CreateConversionStmt * -_readCreateConversionStmt(OUT_TYPE(CreateConversionStmt, CreateConversionStmt) msg) +static AlterDomainStmt * +_readAlterDomainStmt(OUT_TYPE(AlterDomainStmt, AlterDomainStmt) msg) { - CreateConversionStmt *node = makeNode(CreateConversionStmt); - READ_LIST_FIELD(conversion_name, conversion_name, conversion_name); - READ_STRING_FIELD(for_encoding_name, for_encoding_name, for_encoding_name); - READ_STRING_FIELD(to_encoding_name, to_encoding_name, to_encoding_name); - READ_LIST_FIELD(func_name, func_name, func_name); - READ_BOOL_FIELD(def, def, def); + AlterDomainStmt *node = makeNode(AlterDomainStmt); + READ_CHAR_FIELD(subtype, subtype, subtype); + READ_LIST_FIELD(type_name, typeName, typeName); + READ_STRING_FIELD(name, name, name); + READ_NODE_PTR_FIELD(def, def, def); + READ_ENUM_FIELD(DropBehavior, behavior, behavior, behavior); + READ_BOOL_FIELD(missing_ok, missing_ok, missing_ok); return node; } -static CreateCastStmt * -_readCreateCastStmt(OUT_TYPE(CreateCastStmt, CreateCastStmt) msg) +static GrantStmt * +_readGrantStmt(OUT_TYPE(GrantStmt, GrantStmt) msg) { - CreateCastStmt *node = makeNode(CreateCastStmt); - READ_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, sourcetype, sourcetype, sourcetype); - READ_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, targettype, targettype, targettype); - READ_SPECIFIC_NODE_PTR_FIELD(ObjectWithArgs, object_with_args, func, func, func); - READ_ENUM_FIELD(CoercionContext, context, context, context); - READ_BOOL_FIELD(inout, inout, inout); + GrantStmt *node = makeNode(GrantStmt); + READ_BOOL_FIELD(is_grant, is_grant, is_grant); + READ_ENUM_FIELD(GrantTargetType, targtype, targtype, targtype); + READ_ENUM_FIELD(ObjectType, objtype, objtype, objtype); + READ_LIST_FIELD(objects, objects, objects); + READ_LIST_FIELD(privileges, privileges, privileges); + READ_LIST_FIELD(grantees, grantees, grantees); + READ_BOOL_FIELD(grant_option, grant_option, grant_option); + READ_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, grantor, grantor, grantor); + READ_ENUM_FIELD(DropBehavior, behavior, behavior, behavior); return node; } -static CreateOpClassStmt * -_readCreateOpClassStmt(OUT_TYPE(CreateOpClassStmt, CreateOpClassStmt) msg) +static ObjectWithArgs * +_readObjectWithArgs(OUT_TYPE(ObjectWithArgs, ObjectWithArgs) msg) { - CreateOpClassStmt *node = makeNode(CreateOpClassStmt); - READ_LIST_FIELD(opclassname, opclassname, opclassname); - READ_LIST_FIELD(opfamilyname, opfamilyname, opfamilyname); - READ_STRING_FIELD(amname, amname, amname); - READ_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, datatype, datatype, datatype); - READ_LIST_FIELD(items, items, items); - READ_BOOL_FIELD(is_default, isDefault, isDefault); + ObjectWithArgs *node = makeNode(ObjectWithArgs); + READ_LIST_FIELD(objname, objname, objname); + READ_LIST_FIELD(objargs, objargs, objargs); + READ_LIST_FIELD(objfuncargs, objfuncargs, objfuncargs); + READ_BOOL_FIELD(args_unspecified, args_unspecified, args_unspecified); return node; } -static CreateOpFamilyStmt * -_readCreateOpFamilyStmt(OUT_TYPE(CreateOpFamilyStmt, CreateOpFamilyStmt) msg) +static AccessPriv * +_readAccessPriv(OUT_TYPE(AccessPriv, AccessPriv) msg) { - CreateOpFamilyStmt *node = makeNode(CreateOpFamilyStmt); - READ_LIST_FIELD(opfamilyname, opfamilyname, opfamilyname); - READ_STRING_FIELD(amname, amname, amname); + AccessPriv *node = makeNode(AccessPriv); + READ_STRING_FIELD(priv_name, priv_name, priv_name); + READ_LIST_FIELD(cols, cols, cols); return node; } -static AlterOpFamilyStmt * -_readAlterOpFamilyStmt(OUT_TYPE(AlterOpFamilyStmt, AlterOpFamilyStmt) msg) +static GrantRoleStmt * +_readGrantRoleStmt(OUT_TYPE(GrantRoleStmt, GrantRoleStmt) msg) { - AlterOpFamilyStmt *node = makeNode(AlterOpFamilyStmt); - READ_LIST_FIELD(opfamilyname, opfamilyname, opfamilyname); - READ_STRING_FIELD(amname, amname, amname); - READ_BOOL_FIELD(is_drop, isDrop, isDrop); - READ_LIST_FIELD(items, items, items); + GrantRoleStmt *node = makeNode(GrantRoleStmt); + READ_LIST_FIELD(granted_roles, granted_roles, granted_roles); + READ_LIST_FIELD(grantee_roles, grantee_roles, grantee_roles); + READ_BOOL_FIELD(is_grant, is_grant, is_grant); + READ_LIST_FIELD(opt, opt, opt); + READ_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, grantor, grantor, grantor); + READ_ENUM_FIELD(DropBehavior, behavior, behavior, behavior); + return node; +} + +static AlterDefaultPrivilegesStmt * +_readAlterDefaultPrivilegesStmt(OUT_TYPE(AlterDefaultPrivilegesStmt, AlterDefaultPrivilegesStmt) msg) +{ + AlterDefaultPrivilegesStmt *node = makeNode(AlterDefaultPrivilegesStmt); + READ_LIST_FIELD(options, options, options); + READ_SPECIFIC_NODE_PTR_FIELD(GrantStmt, grant_stmt, action, action, action); + return node; +} + +static CopyStmt * +_readCopyStmt(OUT_TYPE(CopyStmt, CopyStmt) msg) +{ + CopyStmt *node = makeNode(CopyStmt); + READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); + READ_NODE_PTR_FIELD(query, query, query); + READ_LIST_FIELD(attlist, attlist, attlist); + READ_BOOL_FIELD(is_from, is_from, is_from); + READ_BOOL_FIELD(is_program, is_program, is_program); + READ_STRING_FIELD(filename, filename, filename); + READ_LIST_FIELD(options, options, options); + READ_NODE_PTR_FIELD(where_clause, whereClause, whereClause); return node; } -static PrepareStmt * -_readPrepareStmt(OUT_TYPE(PrepareStmt, PrepareStmt) msg) +static VariableSetStmt * +_readVariableSetStmt(OUT_TYPE(VariableSetStmt, VariableSetStmt) msg) { - PrepareStmt *node = makeNode(PrepareStmt); + VariableSetStmt *node = makeNode(VariableSetStmt); + READ_ENUM_FIELD(VariableSetKind, kind, kind, kind); READ_STRING_FIELD(name, name, name); - READ_LIST_FIELD(argtypes, argtypes, argtypes); - READ_NODE_PTR_FIELD(query, query, query); + READ_LIST_FIELD(args, args, args); + READ_BOOL_FIELD(is_local, is_local, is_local); return node; } -static ExecuteStmt * -_readExecuteStmt(OUT_TYPE(ExecuteStmt, ExecuteStmt) msg) +static VariableShowStmt * +_readVariableShowStmt(OUT_TYPE(VariableShowStmt, VariableShowStmt) msg) { - ExecuteStmt *node = makeNode(ExecuteStmt); + VariableShowStmt *node = makeNode(VariableShowStmt); READ_STRING_FIELD(name, name, name); - READ_LIST_FIELD(params, params, params); return node; } -static DeallocateStmt * -_readDeallocateStmt(OUT_TYPE(DeallocateStmt, DeallocateStmt) msg) +static CreateStmt * +_readCreateStmt(OUT_TYPE(CreateStmt, CreateStmt) msg) { - DeallocateStmt *node = makeNode(DeallocateStmt); - READ_STRING_FIELD(name, name, name); + CreateStmt *node = makeNode(CreateStmt); + READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); + READ_LIST_FIELD(table_elts, tableElts, tableElts); + READ_LIST_FIELD(inh_relations, inhRelations, inhRelations); + READ_SPECIFIC_NODE_PTR_FIELD(PartitionBoundSpec, partition_bound_spec, partbound, partbound, partbound); + READ_SPECIFIC_NODE_PTR_FIELD(PartitionSpec, partition_spec, partspec, partspec, partspec); + READ_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, of_typename, ofTypename, ofTypename); + READ_LIST_FIELD(constraints, constraints, constraints); + READ_LIST_FIELD(options, options, options); + READ_ENUM_FIELD(OnCommitAction, oncommit, oncommit, oncommit); + READ_STRING_FIELD(tablespacename, tablespacename, tablespacename); + READ_STRING_FIELD(access_method, accessMethod, accessMethod); + READ_BOOL_FIELD(if_not_exists, if_not_exists, if_not_exists); return node; } -static DeclareCursorStmt * -_readDeclareCursorStmt(OUT_TYPE(DeclareCursorStmt, DeclareCursorStmt) msg) +static Constraint * +_readConstraint(OUT_TYPE(Constraint, Constraint) msg) { - DeclareCursorStmt *node = makeNode(DeclareCursorStmt); - READ_STRING_FIELD(portalname, portalname, portalname); - READ_INT_FIELD(options, options, options); - READ_NODE_PTR_FIELD(query, query, query); + Constraint *node = makeNode(Constraint); + READ_ENUM_FIELD(ConstrType, contype, contype, contype); + READ_STRING_FIELD(conname, conname, conname); + READ_BOOL_FIELD(deferrable, deferrable, deferrable); + READ_BOOL_FIELD(initdeferred, initdeferred, initdeferred); + READ_INT_FIELD(location, location, location); + READ_BOOL_FIELD(is_no_inherit, is_no_inherit, is_no_inherit); + READ_NODE_PTR_FIELD(raw_expr, raw_expr, raw_expr); + READ_STRING_FIELD(cooked_expr, cooked_expr, cooked_expr); + READ_CHAR_FIELD(generated_when, generated_when, generated_when); + READ_BOOL_FIELD(nulls_not_distinct, nulls_not_distinct, nulls_not_distinct); + READ_LIST_FIELD(keys, keys, keys); + READ_LIST_FIELD(including, including, including); + READ_LIST_FIELD(exclusions, exclusions, exclusions); + READ_LIST_FIELD(options, options, options); + READ_STRING_FIELD(indexname, indexname, indexname); + READ_STRING_FIELD(indexspace, indexspace, indexspace); + READ_BOOL_FIELD(reset_default_tblspc, reset_default_tblspc, reset_default_tblspc); + READ_STRING_FIELD(access_method, access_method, access_method); + READ_NODE_PTR_FIELD(where_clause, where_clause, where_clause); + READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, pktable, pktable, pktable); + READ_LIST_FIELD(fk_attrs, fk_attrs, fk_attrs); + READ_LIST_FIELD(pk_attrs, pk_attrs, pk_attrs); + READ_CHAR_FIELD(fk_matchtype, fk_matchtype, fk_matchtype); + READ_CHAR_FIELD(fk_upd_action, fk_upd_action, fk_upd_action); + READ_CHAR_FIELD(fk_del_action, fk_del_action, fk_del_action); + READ_LIST_FIELD(fk_del_set_cols, fk_del_set_cols, fk_del_set_cols); + READ_LIST_FIELD(old_conpfeqop, old_conpfeqop, old_conpfeqop); + READ_UINT_FIELD(old_pktable_oid, old_pktable_oid, old_pktable_oid); + READ_BOOL_FIELD(skip_validation, skip_validation, skip_validation); + READ_BOOL_FIELD(initially_valid, initially_valid, initially_valid); return node; } @@ -1774,137 +2079,55 @@ _readDropTableSpaceStmt(OUT_TYPE(DropTableSpaceStmt, DropTableSpaceStmt) msg) return node; } -static AlterObjectDependsStmt * -_readAlterObjectDependsStmt(OUT_TYPE(AlterObjectDependsStmt, AlterObjectDependsStmt) msg) -{ - AlterObjectDependsStmt *node = makeNode(AlterObjectDependsStmt); - READ_ENUM_FIELD(ObjectType, object_type, objectType, objectType); - READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); - READ_NODE_PTR_FIELD(object, object, object); - READ_SPECIFIC_NODE_PTR_FIELD(String, string, extname, extname, extname); - READ_BOOL_FIELD(remove, remove, remove); - return node; -} - -static AlterObjectSchemaStmt * -_readAlterObjectSchemaStmt(OUT_TYPE(AlterObjectSchemaStmt, AlterObjectSchemaStmt) msg) -{ - AlterObjectSchemaStmt *node = makeNode(AlterObjectSchemaStmt); - READ_ENUM_FIELD(ObjectType, object_type, objectType, objectType); - READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); - READ_NODE_PTR_FIELD(object, object, object); - READ_STRING_FIELD(newschema, newschema, newschema); - READ_BOOL_FIELD(missing_ok, missing_ok, missing_ok); - return node; -} - -static AlterOwnerStmt * -_readAlterOwnerStmt(OUT_TYPE(AlterOwnerStmt, AlterOwnerStmt) msg) -{ - AlterOwnerStmt *node = makeNode(AlterOwnerStmt); - READ_ENUM_FIELD(ObjectType, object_type, objectType, objectType); - READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); - READ_NODE_PTR_FIELD(object, object, object); - READ_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, newowner, newowner, newowner); - return node; -} - -static AlterOperatorStmt * -_readAlterOperatorStmt(OUT_TYPE(AlterOperatorStmt, AlterOperatorStmt) msg) -{ - AlterOperatorStmt *node = makeNode(AlterOperatorStmt); - READ_SPECIFIC_NODE_PTR_FIELD(ObjectWithArgs, object_with_args, opername, opername, opername); - READ_LIST_FIELD(options, options, options); - return node; -} - -static AlterTypeStmt * -_readAlterTypeStmt(OUT_TYPE(AlterTypeStmt, AlterTypeStmt) msg) +static AlterTableSpaceOptionsStmt * +_readAlterTableSpaceOptionsStmt(OUT_TYPE(AlterTableSpaceOptionsStmt, AlterTableSpaceOptionsStmt) msg) { - AlterTypeStmt *node = makeNode(AlterTypeStmt); - READ_LIST_FIELD(type_name, typeName, typeName); + AlterTableSpaceOptionsStmt *node = makeNode(AlterTableSpaceOptionsStmt); + READ_STRING_FIELD(tablespacename, tablespacename, tablespacename); READ_LIST_FIELD(options, options, options); + READ_BOOL_FIELD(is_reset, isReset, isReset); return node; } -static DropOwnedStmt * -_readDropOwnedStmt(OUT_TYPE(DropOwnedStmt, DropOwnedStmt) msg) -{ - DropOwnedStmt *node = makeNode(DropOwnedStmt); - READ_LIST_FIELD(roles, roles, roles); - READ_ENUM_FIELD(DropBehavior, behavior, behavior, behavior); - return node; -} - -static ReassignOwnedStmt * -_readReassignOwnedStmt(OUT_TYPE(ReassignOwnedStmt, ReassignOwnedStmt) msg) +static AlterTableMoveAllStmt * +_readAlterTableMoveAllStmt(OUT_TYPE(AlterTableMoveAllStmt, AlterTableMoveAllStmt) msg) { - ReassignOwnedStmt *node = makeNode(ReassignOwnedStmt); + AlterTableMoveAllStmt *node = makeNode(AlterTableMoveAllStmt); + READ_STRING_FIELD(orig_tablespacename, orig_tablespacename, orig_tablespacename); + READ_ENUM_FIELD(ObjectType, objtype, objtype, objtype); READ_LIST_FIELD(roles, roles, roles); - READ_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, newrole, newrole, newrole); - return node; -} - -static CompositeTypeStmt * -_readCompositeTypeStmt(OUT_TYPE(CompositeTypeStmt, CompositeTypeStmt) msg) -{ - CompositeTypeStmt *node = makeNode(CompositeTypeStmt); - READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, typevar, typevar, typevar); - READ_LIST_FIELD(coldeflist, coldeflist, coldeflist); - return node; -} - -static CreateEnumStmt * -_readCreateEnumStmt(OUT_TYPE(CreateEnumStmt, CreateEnumStmt) msg) -{ - CreateEnumStmt *node = makeNode(CreateEnumStmt); - READ_LIST_FIELD(type_name, typeName, typeName); - READ_LIST_FIELD(vals, vals, vals); - return node; -} - -static CreateRangeStmt * -_readCreateRangeStmt(OUT_TYPE(CreateRangeStmt, CreateRangeStmt) msg) -{ - CreateRangeStmt *node = makeNode(CreateRangeStmt); - READ_LIST_FIELD(type_name, typeName, typeName); - READ_LIST_FIELD(params, params, params); + READ_STRING_FIELD(new_tablespacename, new_tablespacename, new_tablespacename); + READ_BOOL_FIELD(nowait, nowait, nowait); return node; } -static AlterEnumStmt * -_readAlterEnumStmt(OUT_TYPE(AlterEnumStmt, AlterEnumStmt) msg) +static CreateExtensionStmt * +_readCreateExtensionStmt(OUT_TYPE(CreateExtensionStmt, CreateExtensionStmt) msg) { - AlterEnumStmt *node = makeNode(AlterEnumStmt); - READ_LIST_FIELD(type_name, typeName, typeName); - READ_STRING_FIELD(old_val, oldVal, oldVal); - READ_STRING_FIELD(new_val, newVal, newVal); - READ_STRING_FIELD(new_val_neighbor, newValNeighbor, newValNeighbor); - READ_BOOL_FIELD(new_val_is_after, newValIsAfter, newValIsAfter); - READ_BOOL_FIELD(skip_if_new_val_exists, skipIfNewValExists, skipIfNewValExists); + CreateExtensionStmt *node = makeNode(CreateExtensionStmt); + READ_STRING_FIELD(extname, extname, extname); + READ_BOOL_FIELD(if_not_exists, if_not_exists, if_not_exists); + READ_LIST_FIELD(options, options, options); return node; } -static AlterTSDictionaryStmt * -_readAlterTSDictionaryStmt(OUT_TYPE(AlterTSDictionaryStmt, AlterTSDictionaryStmt) msg) +static AlterExtensionStmt * +_readAlterExtensionStmt(OUT_TYPE(AlterExtensionStmt, AlterExtensionStmt) msg) { - AlterTSDictionaryStmt *node = makeNode(AlterTSDictionaryStmt); - READ_LIST_FIELD(dictname, dictname, dictname); + AlterExtensionStmt *node = makeNode(AlterExtensionStmt); + READ_STRING_FIELD(extname, extname, extname); READ_LIST_FIELD(options, options, options); return node; } -static AlterTSConfigurationStmt * -_readAlterTSConfigurationStmt(OUT_TYPE(AlterTSConfigurationStmt, AlterTSConfigurationStmt) msg) +static AlterExtensionContentsStmt * +_readAlterExtensionContentsStmt(OUT_TYPE(AlterExtensionContentsStmt, AlterExtensionContentsStmt) msg) { - AlterTSConfigurationStmt *node = makeNode(AlterTSConfigurationStmt); - READ_ENUM_FIELD(AlterTSConfigType, kind, kind, kind); - READ_LIST_FIELD(cfgname, cfgname, cfgname); - READ_LIST_FIELD(tokentype, tokentype, tokentype); - READ_LIST_FIELD(dicts, dicts, dicts); - READ_BOOL_FIELD(override, override, override); - READ_BOOL_FIELD(replace, replace, replace); - READ_BOOL_FIELD(missing_ok, missing_ok, missing_ok); + AlterExtensionContentsStmt *node = makeNode(AlterExtensionContentsStmt); + READ_STRING_FIELD(extname, extname, extname); + READ_INT_FIELD(action, action, action); + READ_ENUM_FIELD(ObjectType, objtype, objtype, objtype); + READ_NODE_PTR_FIELD(object, object, object); return node; } @@ -1952,78 +2175,45 @@ _readAlterForeignServerStmt(OUT_TYPE(AlterForeignServerStmt, AlterForeignServerS return node; } -static CreateUserMappingStmt * -_readCreateUserMappingStmt(OUT_TYPE(CreateUserMappingStmt, CreateUserMappingStmt) msg) -{ - CreateUserMappingStmt *node = makeNode(CreateUserMappingStmt); - READ_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, user, user, user); - READ_STRING_FIELD(servername, servername, servername); - READ_BOOL_FIELD(if_not_exists, if_not_exists, if_not_exists); - READ_LIST_FIELD(options, options, options); - return node; -} - -static AlterUserMappingStmt * -_readAlterUserMappingStmt(OUT_TYPE(AlterUserMappingStmt, AlterUserMappingStmt) msg) -{ - AlterUserMappingStmt *node = makeNode(AlterUserMappingStmt); - READ_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, user, user, user); - READ_STRING_FIELD(servername, servername, servername); - READ_LIST_FIELD(options, options, options); - return node; -} - -static DropUserMappingStmt * -_readDropUserMappingStmt(OUT_TYPE(DropUserMappingStmt, DropUserMappingStmt) msg) +static CreateForeignTableStmt * +_readCreateForeignTableStmt(OUT_TYPE(CreateForeignTableStmt, CreateForeignTableStmt) msg) { - DropUserMappingStmt *node = makeNode(DropUserMappingStmt); - READ_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, user, user, user); + CreateForeignTableStmt *node = makeNode(CreateForeignTableStmt); + READ_SPECIFIC_NODE_FIELD(CreateStmt, create_stmt, base_stmt, base, base); READ_STRING_FIELD(servername, servername, servername); - READ_BOOL_FIELD(missing_ok, missing_ok, missing_ok); - return node; -} - -static AlterTableSpaceOptionsStmt * -_readAlterTableSpaceOptionsStmt(OUT_TYPE(AlterTableSpaceOptionsStmt, AlterTableSpaceOptionsStmt) msg) -{ - AlterTableSpaceOptionsStmt *node = makeNode(AlterTableSpaceOptionsStmt); - READ_STRING_FIELD(tablespacename, tablespacename, tablespacename); READ_LIST_FIELD(options, options, options); - READ_BOOL_FIELD(is_reset, isReset, isReset); + NodeSetTag(node, T_CreateForeignTableStmt); return node; } -static AlterTableMoveAllStmt * -_readAlterTableMoveAllStmt(OUT_TYPE(AlterTableMoveAllStmt, AlterTableMoveAllStmt) msg) +static CreateUserMappingStmt * +_readCreateUserMappingStmt(OUT_TYPE(CreateUserMappingStmt, CreateUserMappingStmt) msg) { - AlterTableMoveAllStmt *node = makeNode(AlterTableMoveAllStmt); - READ_STRING_FIELD(orig_tablespacename, orig_tablespacename, orig_tablespacename); - READ_ENUM_FIELD(ObjectType, objtype, objtype, objtype); - READ_LIST_FIELD(roles, roles, roles); - READ_STRING_FIELD(new_tablespacename, new_tablespacename, new_tablespacename); - READ_BOOL_FIELD(nowait, nowait, nowait); + CreateUserMappingStmt *node = makeNode(CreateUserMappingStmt); + READ_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, user, user, user); + READ_STRING_FIELD(servername, servername, servername); + READ_BOOL_FIELD(if_not_exists, if_not_exists, if_not_exists); + READ_LIST_FIELD(options, options, options); return node; } -static SecLabelStmt * -_readSecLabelStmt(OUT_TYPE(SecLabelStmt, SecLabelStmt) msg) +static AlterUserMappingStmt * +_readAlterUserMappingStmt(OUT_TYPE(AlterUserMappingStmt, AlterUserMappingStmt) msg) { - SecLabelStmt *node = makeNode(SecLabelStmt); - READ_ENUM_FIELD(ObjectType, objtype, objtype, objtype); - READ_NODE_PTR_FIELD(object, object, object); - READ_STRING_FIELD(provider, provider, provider); - READ_STRING_FIELD(label, label, label); + AlterUserMappingStmt *node = makeNode(AlterUserMappingStmt); + READ_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, user, user, user); + READ_STRING_FIELD(servername, servername, servername); + READ_LIST_FIELD(options, options, options); return node; } -static CreateForeignTableStmt * -_readCreateForeignTableStmt(OUT_TYPE(CreateForeignTableStmt, CreateForeignTableStmt) msg) +static DropUserMappingStmt * +_readDropUserMappingStmt(OUT_TYPE(DropUserMappingStmt, DropUserMappingStmt) msg) { - CreateForeignTableStmt *node = makeNode(CreateForeignTableStmt); - READ_SPECIFIC_NODE_FIELD(CreateStmt, create_stmt, base_stmt, base, base); + DropUserMappingStmt *node = makeNode(DropUserMappingStmt); + READ_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, user, user, user); READ_STRING_FIELD(servername, servername, servername); - READ_LIST_FIELD(options, options, options); - NodeSetTag(node, T_CreateForeignTableStmt); + READ_BOOL_FIELD(missing_ok, missing_ok, missing_ok); return node; } @@ -2040,33 +2230,61 @@ _readImportForeignSchemaStmt(OUT_TYPE(ImportForeignSchemaStmt, ImportForeignSche return node; } -static CreateExtensionStmt * -_readCreateExtensionStmt(OUT_TYPE(CreateExtensionStmt, CreateExtensionStmt) msg) +static CreatePolicyStmt * +_readCreatePolicyStmt(OUT_TYPE(CreatePolicyStmt, CreatePolicyStmt) msg) { - CreateExtensionStmt *node = makeNode(CreateExtensionStmt); - READ_STRING_FIELD(extname, extname, extname); - READ_BOOL_FIELD(if_not_exists, if_not_exists, if_not_exists); - READ_LIST_FIELD(options, options, options); + CreatePolicyStmt *node = makeNode(CreatePolicyStmt); + READ_STRING_FIELD(policy_name, policy_name, policy_name); + READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, table, table, table); + READ_STRING_FIELD(cmd_name, cmd_name, cmd_name); + READ_BOOL_FIELD(permissive, permissive, permissive); + READ_LIST_FIELD(roles, roles, roles); + READ_NODE_PTR_FIELD(qual, qual, qual); + READ_NODE_PTR_FIELD(with_check, with_check, with_check); return node; } -static AlterExtensionStmt * -_readAlterExtensionStmt(OUT_TYPE(AlterExtensionStmt, AlterExtensionStmt) msg) +static AlterPolicyStmt * +_readAlterPolicyStmt(OUT_TYPE(AlterPolicyStmt, AlterPolicyStmt) msg) { - AlterExtensionStmt *node = makeNode(AlterExtensionStmt); - READ_STRING_FIELD(extname, extname, extname); - READ_LIST_FIELD(options, options, options); + AlterPolicyStmt *node = makeNode(AlterPolicyStmt); + READ_STRING_FIELD(policy_name, policy_name, policy_name); + READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, table, table, table); + READ_LIST_FIELD(roles, roles, roles); + READ_NODE_PTR_FIELD(qual, qual, qual); + READ_NODE_PTR_FIELD(with_check, with_check, with_check); return node; } -static AlterExtensionContentsStmt * -_readAlterExtensionContentsStmt(OUT_TYPE(AlterExtensionContentsStmt, AlterExtensionContentsStmt) msg) +static CreateAmStmt * +_readCreateAmStmt(OUT_TYPE(CreateAmStmt, CreateAmStmt) msg) { - AlterExtensionContentsStmt *node = makeNode(AlterExtensionContentsStmt); - READ_STRING_FIELD(extname, extname, extname); - READ_INT_FIELD(action, action, action); - READ_ENUM_FIELD(ObjectType, objtype, objtype, objtype); - READ_NODE_PTR_FIELD(object, object, object); + CreateAmStmt *node = makeNode(CreateAmStmt); + READ_STRING_FIELD(amname, amname, amname); + READ_LIST_FIELD(handler_name, handler_name, handler_name); + READ_CHAR_FIELD(amtype, amtype, amtype); + return node; +} + +static CreateTrigStmt * +_readCreateTrigStmt(OUT_TYPE(CreateTrigStmt, CreateTrigStmt) msg) +{ + CreateTrigStmt *node = makeNode(CreateTrigStmt); + READ_BOOL_FIELD(replace, replace, replace); + READ_BOOL_FIELD(isconstraint, isconstraint, isconstraint); + READ_STRING_FIELD(trigname, trigname, trigname); + READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); + READ_LIST_FIELD(funcname, funcname, funcname); + READ_LIST_FIELD(args, args, args); + READ_BOOL_FIELD(row, row, row); + READ_INT_FIELD(timing, timing, timing); + READ_INT_FIELD(events, events, events); + READ_LIST_FIELD(columns, columns, columns); + READ_NODE_PTR_FIELD(when_clause, whenClause, whenClause); + READ_LIST_FIELD(transition_rels, transitionRels, transitionRels); + READ_BOOL_FIELD(deferrable, deferrable, deferrable); + READ_BOOL_FIELD(initdeferred, initdeferred, initdeferred); + READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, constrrel, constrrel, constrrel); return node; } @@ -2090,134 +2308,252 @@ _readAlterEventTrigStmt(OUT_TYPE(AlterEventTrigStmt, AlterEventTrigStmt) msg) return node; } -static RefreshMatViewStmt * -_readRefreshMatViewStmt(OUT_TYPE(RefreshMatViewStmt, RefreshMatViewStmt) msg) +static CreatePLangStmt * +_readCreatePLangStmt(OUT_TYPE(CreatePLangStmt, CreatePLangStmt) msg) { - RefreshMatViewStmt *node = makeNode(RefreshMatViewStmt); - READ_BOOL_FIELD(concurrent, concurrent, concurrent); - READ_BOOL_FIELD(skip_data, skipData, skipData); - READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); + CreatePLangStmt *node = makeNode(CreatePLangStmt); + READ_BOOL_FIELD(replace, replace, replace); + READ_STRING_FIELD(plname, plname, plname); + READ_LIST_FIELD(plhandler, plhandler, plhandler); + READ_LIST_FIELD(plinline, plinline, plinline); + READ_LIST_FIELD(plvalidator, plvalidator, plvalidator); + READ_BOOL_FIELD(pltrusted, pltrusted, pltrusted); return node; } -static ReplicaIdentityStmt * -_readReplicaIdentityStmt(OUT_TYPE(ReplicaIdentityStmt, ReplicaIdentityStmt) msg) +static CreateRoleStmt * +_readCreateRoleStmt(OUT_TYPE(CreateRoleStmt, CreateRoleStmt) msg) { - ReplicaIdentityStmt *node = makeNode(ReplicaIdentityStmt); - READ_CHAR_FIELD(identity_type, identity_type, identity_type); - READ_STRING_FIELD(name, name, name); + CreateRoleStmt *node = makeNode(CreateRoleStmt); + READ_ENUM_FIELD(RoleStmtType, stmt_type, stmt_type, stmt_type); + READ_STRING_FIELD(role, role, role); + READ_LIST_FIELD(options, options, options); return node; } -static AlterSystemStmt * -_readAlterSystemStmt(OUT_TYPE(AlterSystemStmt, AlterSystemStmt) msg) +static AlterRoleStmt * +_readAlterRoleStmt(OUT_TYPE(AlterRoleStmt, AlterRoleStmt) msg) { - AlterSystemStmt *node = makeNode(AlterSystemStmt); + AlterRoleStmt *node = makeNode(AlterRoleStmt); + READ_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, role, role, role); + READ_LIST_FIELD(options, options, options); + READ_INT_FIELD(action, action, action); + return node; +} + +static AlterRoleSetStmt * +_readAlterRoleSetStmt(OUT_TYPE(AlterRoleSetStmt, AlterRoleSetStmt) msg) +{ + AlterRoleSetStmt *node = makeNode(AlterRoleSetStmt); + READ_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, role, role, role); + READ_STRING_FIELD(database, database, database); READ_SPECIFIC_NODE_PTR_FIELD(VariableSetStmt, variable_set_stmt, setstmt, setstmt, setstmt); return node; } -static CreatePolicyStmt * -_readCreatePolicyStmt(OUT_TYPE(CreatePolicyStmt, CreatePolicyStmt) msg) +static DropRoleStmt * +_readDropRoleStmt(OUT_TYPE(DropRoleStmt, DropRoleStmt) msg) { - CreatePolicyStmt *node = makeNode(CreatePolicyStmt); - READ_STRING_FIELD(policy_name, policy_name, policy_name); - READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, table, table, table); - READ_STRING_FIELD(cmd_name, cmd_name, cmd_name); - READ_BOOL_FIELD(permissive, permissive, permissive); + DropRoleStmt *node = makeNode(DropRoleStmt); READ_LIST_FIELD(roles, roles, roles); - READ_NODE_PTR_FIELD(qual, qual, qual); - READ_NODE_PTR_FIELD(with_check, with_check, with_check); + READ_BOOL_FIELD(missing_ok, missing_ok, missing_ok); return node; } -static AlterPolicyStmt * -_readAlterPolicyStmt(OUT_TYPE(AlterPolicyStmt, AlterPolicyStmt) msg) +static CreateSeqStmt * +_readCreateSeqStmt(OUT_TYPE(CreateSeqStmt, CreateSeqStmt) msg) +{ + CreateSeqStmt *node = makeNode(CreateSeqStmt); + READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, sequence, sequence, sequence); + READ_LIST_FIELD(options, options, options); + READ_UINT_FIELD(owner_id, ownerId, ownerId); + READ_BOOL_FIELD(for_identity, for_identity, for_identity); + READ_BOOL_FIELD(if_not_exists, if_not_exists, if_not_exists); + return node; +} + +static AlterSeqStmt * +_readAlterSeqStmt(OUT_TYPE(AlterSeqStmt, AlterSeqStmt) msg) +{ + AlterSeqStmt *node = makeNode(AlterSeqStmt); + READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, sequence, sequence, sequence); + READ_LIST_FIELD(options, options, options); + READ_BOOL_FIELD(for_identity, for_identity, for_identity); + READ_BOOL_FIELD(missing_ok, missing_ok, missing_ok); + return node; +} + +static DefineStmt * +_readDefineStmt(OUT_TYPE(DefineStmt, DefineStmt) msg) +{ + DefineStmt *node = makeNode(DefineStmt); + READ_ENUM_FIELD(ObjectType, kind, kind, kind); + READ_BOOL_FIELD(oldstyle, oldstyle, oldstyle); + READ_LIST_FIELD(defnames, defnames, defnames); + READ_LIST_FIELD(args, args, args); + READ_LIST_FIELD(definition, definition, definition); + READ_BOOL_FIELD(if_not_exists, if_not_exists, if_not_exists); + READ_BOOL_FIELD(replace, replace, replace); + return node; +} + +static CreateDomainStmt * +_readCreateDomainStmt(OUT_TYPE(CreateDomainStmt, CreateDomainStmt) msg) +{ + CreateDomainStmt *node = makeNode(CreateDomainStmt); + READ_LIST_FIELD(domainname, domainname, domainname); + READ_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, type_name, typeName, typeName); + READ_SPECIFIC_NODE_PTR_FIELD(CollateClause, collate_clause, coll_clause, collClause, collClause); + READ_LIST_FIELD(constraints, constraints, constraints); + return node; +} + +static CreateOpClassStmt * +_readCreateOpClassStmt(OUT_TYPE(CreateOpClassStmt, CreateOpClassStmt) msg) +{ + CreateOpClassStmt *node = makeNode(CreateOpClassStmt); + READ_LIST_FIELD(opclassname, opclassname, opclassname); + READ_LIST_FIELD(opfamilyname, opfamilyname, opfamilyname); + READ_STRING_FIELD(amname, amname, amname); + READ_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, datatype, datatype, datatype); + READ_LIST_FIELD(items, items, items); + READ_BOOL_FIELD(is_default, isDefault, isDefault); + return node; +} + +static CreateOpClassItem * +_readCreateOpClassItem(OUT_TYPE(CreateOpClassItem, CreateOpClassItem) msg) +{ + CreateOpClassItem *node = makeNode(CreateOpClassItem); + READ_INT_FIELD(itemtype, itemtype, itemtype); + READ_SPECIFIC_NODE_PTR_FIELD(ObjectWithArgs, object_with_args, name, name, name); + READ_INT_FIELD(number, number, number); + READ_LIST_FIELD(order_family, order_family, order_family); + READ_LIST_FIELD(class_args, class_args, class_args); + READ_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, storedtype, storedtype, storedtype); + return node; +} + +static CreateOpFamilyStmt * +_readCreateOpFamilyStmt(OUT_TYPE(CreateOpFamilyStmt, CreateOpFamilyStmt) msg) +{ + CreateOpFamilyStmt *node = makeNode(CreateOpFamilyStmt); + READ_LIST_FIELD(opfamilyname, opfamilyname, opfamilyname); + READ_STRING_FIELD(amname, amname, amname); + return node; +} + +static AlterOpFamilyStmt * +_readAlterOpFamilyStmt(OUT_TYPE(AlterOpFamilyStmt, AlterOpFamilyStmt) msg) +{ + AlterOpFamilyStmt *node = makeNode(AlterOpFamilyStmt); + READ_LIST_FIELD(opfamilyname, opfamilyname, opfamilyname); + READ_STRING_FIELD(amname, amname, amname); + READ_BOOL_FIELD(is_drop, isDrop, isDrop); + READ_LIST_FIELD(items, items, items); + return node; +} + +static DropStmt * +_readDropStmt(OUT_TYPE(DropStmt, DropStmt) msg) { - AlterPolicyStmt *node = makeNode(AlterPolicyStmt); - READ_STRING_FIELD(policy_name, policy_name, policy_name); - READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, table, table, table); - READ_LIST_FIELD(roles, roles, roles); - READ_NODE_PTR_FIELD(qual, qual, qual); - READ_NODE_PTR_FIELD(with_check, with_check, with_check); + DropStmt *node = makeNode(DropStmt); + READ_LIST_FIELD(objects, objects, objects); + READ_ENUM_FIELD(ObjectType, remove_type, removeType, removeType); + READ_ENUM_FIELD(DropBehavior, behavior, behavior, behavior); + READ_BOOL_FIELD(missing_ok, missing_ok, missing_ok); + READ_BOOL_FIELD(concurrent, concurrent, concurrent); return node; } -static CreateTransformStmt * -_readCreateTransformStmt(OUT_TYPE(CreateTransformStmt, CreateTransformStmt) msg) +static TruncateStmt * +_readTruncateStmt(OUT_TYPE(TruncateStmt, TruncateStmt) msg) { - CreateTransformStmt *node = makeNode(CreateTransformStmt); - READ_BOOL_FIELD(replace, replace, replace); - READ_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, type_name, type_name, type_name); - READ_STRING_FIELD(lang, lang, lang); - READ_SPECIFIC_NODE_PTR_FIELD(ObjectWithArgs, object_with_args, fromsql, fromsql, fromsql); - READ_SPECIFIC_NODE_PTR_FIELD(ObjectWithArgs, object_with_args, tosql, tosql, tosql); + TruncateStmt *node = makeNode(TruncateStmt); + READ_LIST_FIELD(relations, relations, relations); + READ_BOOL_FIELD(restart_seqs, restart_seqs, restart_seqs); + READ_ENUM_FIELD(DropBehavior, behavior, behavior, behavior); return node; } -static CreateAmStmt * -_readCreateAmStmt(OUT_TYPE(CreateAmStmt, CreateAmStmt) msg) +static CommentStmt * +_readCommentStmt(OUT_TYPE(CommentStmt, CommentStmt) msg) { - CreateAmStmt *node = makeNode(CreateAmStmt); - READ_STRING_FIELD(amname, amname, amname); - READ_LIST_FIELD(handler_name, handler_name, handler_name); - READ_CHAR_FIELD(amtype, amtype, amtype); + CommentStmt *node = makeNode(CommentStmt); + READ_ENUM_FIELD(ObjectType, objtype, objtype, objtype); + READ_NODE_PTR_FIELD(object, object, object); + READ_STRING_FIELD(comment, comment, comment); return node; } -static CreatePublicationStmt * -_readCreatePublicationStmt(OUT_TYPE(CreatePublicationStmt, CreatePublicationStmt) msg) +static SecLabelStmt * +_readSecLabelStmt(OUT_TYPE(SecLabelStmt, SecLabelStmt) msg) { - CreatePublicationStmt *node = makeNode(CreatePublicationStmt); - READ_STRING_FIELD(pubname, pubname, pubname); - READ_LIST_FIELD(options, options, options); - READ_LIST_FIELD(pubobjects, pubobjects, pubobjects); - READ_BOOL_FIELD(for_all_tables, for_all_tables, for_all_tables); + SecLabelStmt *node = makeNode(SecLabelStmt); + READ_ENUM_FIELD(ObjectType, objtype, objtype, objtype); + READ_NODE_PTR_FIELD(object, object, object); + READ_STRING_FIELD(provider, provider, provider); + READ_STRING_FIELD(label, label, label); return node; } -static AlterPublicationStmt * -_readAlterPublicationStmt(OUT_TYPE(AlterPublicationStmt, AlterPublicationStmt) msg) +static DeclareCursorStmt * +_readDeclareCursorStmt(OUT_TYPE(DeclareCursorStmt, DeclareCursorStmt) msg) { - AlterPublicationStmt *node = makeNode(AlterPublicationStmt); - READ_STRING_FIELD(pubname, pubname, pubname); - READ_LIST_FIELD(options, options, options); - READ_LIST_FIELD(pubobjects, pubobjects, pubobjects); - READ_BOOL_FIELD(for_all_tables, for_all_tables, for_all_tables); - READ_ENUM_FIELD(AlterPublicationAction, action, action, action); + DeclareCursorStmt *node = makeNode(DeclareCursorStmt); + READ_STRING_FIELD(portalname, portalname, portalname); + READ_INT_FIELD(options, options, options); + READ_NODE_PTR_FIELD(query, query, query); return node; } -static CreateSubscriptionStmt * -_readCreateSubscriptionStmt(OUT_TYPE(CreateSubscriptionStmt, CreateSubscriptionStmt) msg) +static ClosePortalStmt * +_readClosePortalStmt(OUT_TYPE(ClosePortalStmt, ClosePortalStmt) msg) { - CreateSubscriptionStmt *node = makeNode(CreateSubscriptionStmt); - READ_STRING_FIELD(subname, subname, subname); - READ_STRING_FIELD(conninfo, conninfo, conninfo); - READ_LIST_FIELD(publication, publication, publication); - READ_LIST_FIELD(options, options, options); + ClosePortalStmt *node = makeNode(ClosePortalStmt); + READ_STRING_FIELD(portalname, portalname, portalname); return node; } -static AlterSubscriptionStmt * -_readAlterSubscriptionStmt(OUT_TYPE(AlterSubscriptionStmt, AlterSubscriptionStmt) msg) +static FetchStmt * +_readFetchStmt(OUT_TYPE(FetchStmt, FetchStmt) msg) { - AlterSubscriptionStmt *node = makeNode(AlterSubscriptionStmt); - READ_ENUM_FIELD(AlterSubscriptionType, kind, kind, kind); - READ_STRING_FIELD(subname, subname, subname); - READ_STRING_FIELD(conninfo, conninfo, conninfo); - READ_LIST_FIELD(publication, publication, publication); - READ_LIST_FIELD(options, options, options); + FetchStmt *node = makeNode(FetchStmt); + READ_ENUM_FIELD(FetchDirection, direction, direction, direction); + READ_LONG_FIELD(how_many, howMany, howMany); + READ_STRING_FIELD(portalname, portalname, portalname); + READ_BOOL_FIELD(ismove, ismove, ismove); return node; } -static DropSubscriptionStmt * -_readDropSubscriptionStmt(OUT_TYPE(DropSubscriptionStmt, DropSubscriptionStmt) msg) +static IndexStmt * +_readIndexStmt(OUT_TYPE(IndexStmt, IndexStmt) msg) { - DropSubscriptionStmt *node = makeNode(DropSubscriptionStmt); - READ_STRING_FIELD(subname, subname, subname); - READ_BOOL_FIELD(missing_ok, missing_ok, missing_ok); - READ_ENUM_FIELD(DropBehavior, behavior, behavior, behavior); + IndexStmt *node = makeNode(IndexStmt); + READ_STRING_FIELD(idxname, idxname, idxname); + READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); + READ_STRING_FIELD(access_method, accessMethod, accessMethod); + READ_STRING_FIELD(table_space, tableSpace, tableSpace); + READ_LIST_FIELD(index_params, indexParams, indexParams); + READ_LIST_FIELD(index_including_params, indexIncludingParams, indexIncludingParams); + READ_LIST_FIELD(options, options, options); + READ_NODE_PTR_FIELD(where_clause, whereClause, whereClause); + READ_LIST_FIELD(exclude_op_names, excludeOpNames, excludeOpNames); + READ_STRING_FIELD(idxcomment, idxcomment, idxcomment); + READ_UINT_FIELD(index_oid, indexOid, indexOid); + READ_UINT_FIELD(old_number, oldNumber, oldNumber); + READ_UINT_FIELD(old_create_subid, oldCreateSubid, oldCreateSubid); + READ_UINT_FIELD(old_first_relfilelocator_subid, oldFirstRelfilelocatorSubid, oldFirstRelfilelocatorSubid); + READ_BOOL_FIELD(unique, unique, unique); + READ_BOOL_FIELD(nulls_not_distinct, nulls_not_distinct, nulls_not_distinct); + READ_BOOL_FIELD(primary, primary, primary); + READ_BOOL_FIELD(isconstraint, isconstraint, isconstraint); + READ_BOOL_FIELD(deferrable, deferrable, deferrable); + READ_BOOL_FIELD(initdeferred, initdeferred, initdeferred); + READ_BOOL_FIELD(transformed, transformed, transformed); + READ_BOOL_FIELD(concurrent, concurrent, concurrent); + READ_BOOL_FIELD(if_not_exists, if_not_exists, if_not_exists); + READ_BOOL_FIELD(reset_default_tblspc, reset_default_tblspc, reset_default_tblspc); return node; } @@ -2235,21 +2571,12 @@ _readCreateStatsStmt(OUT_TYPE(CreateStatsStmt, CreateStatsStmt) msg) return node; } -static AlterCollationStmt * -_readAlterCollationStmt(OUT_TYPE(AlterCollationStmt, AlterCollationStmt) msg) -{ - AlterCollationStmt *node = makeNode(AlterCollationStmt); - READ_LIST_FIELD(collname, collname, collname); - return node; -} - -static CallStmt * -_readCallStmt(OUT_TYPE(CallStmt, CallStmt) msg) +static StatsElem * +_readStatsElem(OUT_TYPE(StatsElem, StatsElem) msg) { - CallStmt *node = makeNode(CallStmt); - READ_SPECIFIC_NODE_PTR_FIELD(FuncCall, func_call, funccall, funccall, funccall); - READ_SPECIFIC_NODE_PTR_FIELD(FuncExpr, func_expr, funcexpr, funcexpr, funcexpr); - READ_LIST_FIELD(outargs, outargs, outargs); + StatsElem *node = makeNode(StatsElem); + READ_STRING_FIELD(name, name, name); + READ_NODE_PTR_FIELD(expr, expr, expr); return node; } @@ -2263,721 +2590,528 @@ _readAlterStatsStmt(OUT_TYPE(AlterStatsStmt, AlterStatsStmt) msg) return node; } -static A_Expr * -_readAExpr(OUT_TYPE(A_Expr, AExpr) msg) -{ - A_Expr *node = makeNode(A_Expr); - READ_ENUM_FIELD(A_Expr_Kind, kind, kind, kind); - READ_LIST_FIELD(name, name, name); - READ_NODE_PTR_FIELD(lexpr, lexpr, lexpr); - READ_NODE_PTR_FIELD(rexpr, rexpr, rexpr); - READ_INT_FIELD(location, location, location); - return node; -} - -static ColumnRef * -_readColumnRef(OUT_TYPE(ColumnRef, ColumnRef) msg) -{ - ColumnRef *node = makeNode(ColumnRef); - READ_LIST_FIELD(fields, fields, fields); - READ_INT_FIELD(location, location, location); - return node; -} - -static ParamRef * -_readParamRef(OUT_TYPE(ParamRef, ParamRef) msg) -{ - ParamRef *node = makeNode(ParamRef); - READ_INT_FIELD(number, number, number); - READ_INT_FIELD(location, location, location); - return node; -} - -static FuncCall * -_readFuncCall(OUT_TYPE(FuncCall, FuncCall) msg) +static CreateFunctionStmt * +_readCreateFunctionStmt(OUT_TYPE(CreateFunctionStmt, CreateFunctionStmt) msg) { - FuncCall *node = makeNode(FuncCall); + CreateFunctionStmt *node = makeNode(CreateFunctionStmt); + READ_BOOL_FIELD(is_procedure, is_procedure, is_procedure); + READ_BOOL_FIELD(replace, replace, replace); READ_LIST_FIELD(funcname, funcname, funcname); - READ_LIST_FIELD(args, args, args); - READ_LIST_FIELD(agg_order, agg_order, agg_order); - READ_NODE_PTR_FIELD(agg_filter, agg_filter, agg_filter); - READ_SPECIFIC_NODE_PTR_FIELD(WindowDef, window_def, over, over, over); - READ_BOOL_FIELD(agg_within_group, agg_within_group, agg_within_group); - READ_BOOL_FIELD(agg_star, agg_star, agg_star); - READ_BOOL_FIELD(agg_distinct, agg_distinct, agg_distinct); - READ_BOOL_FIELD(func_variadic, func_variadic, func_variadic); - READ_ENUM_FIELD(CoercionForm, funcformat, funcformat, funcformat); - READ_INT_FIELD(location, location, location); + READ_LIST_FIELD(parameters, parameters, parameters); + READ_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, return_type, returnType, returnType); + READ_LIST_FIELD(options, options, options); + READ_NODE_PTR_FIELD(sql_body, sql_body, sql_body); return node; } -static A_Star * -_readAStar(OUT_TYPE(A_Star, AStar) msg) +static FunctionParameter * +_readFunctionParameter(OUT_TYPE(FunctionParameter, FunctionParameter) msg) { - A_Star *node = makeNode(A_Star); + FunctionParameter *node = makeNode(FunctionParameter); + READ_STRING_FIELD(name, name, name); + READ_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, arg_type, argType, argType); + READ_ENUM_FIELD(FunctionParameterMode, mode, mode, mode); + READ_NODE_PTR_FIELD(defexpr, defexpr, defexpr); return node; } -static A_Indices * -_readAIndices(OUT_TYPE(A_Indices, AIndices) msg) +static AlterFunctionStmt * +_readAlterFunctionStmt(OUT_TYPE(AlterFunctionStmt, AlterFunctionStmt) msg) { - A_Indices *node = makeNode(A_Indices); - READ_BOOL_FIELD(is_slice, is_slice, is_slice); - READ_NODE_PTR_FIELD(lidx, lidx, lidx); - READ_NODE_PTR_FIELD(uidx, uidx, uidx); + AlterFunctionStmt *node = makeNode(AlterFunctionStmt); + READ_ENUM_FIELD(ObjectType, objtype, objtype, objtype); + READ_SPECIFIC_NODE_PTR_FIELD(ObjectWithArgs, object_with_args, func, func, func); + READ_LIST_FIELD(actions, actions, actions); return node; } -static A_Indirection * -_readAIndirection(OUT_TYPE(A_Indirection, AIndirection) msg) +static DoStmt * +_readDoStmt(OUT_TYPE(DoStmt, DoStmt) msg) { - A_Indirection *node = makeNode(A_Indirection); - READ_NODE_PTR_FIELD(arg, arg, arg); - READ_LIST_FIELD(indirection, indirection, indirection); + DoStmt *node = makeNode(DoStmt); + READ_LIST_FIELD(args, args, args); return node; } -static A_ArrayExpr * -_readAArrayExpr(OUT_TYPE(A_ArrayExpr, AArrayExpr) msg) +static InlineCodeBlock * +_readInlineCodeBlock(OUT_TYPE(InlineCodeBlock, InlineCodeBlock) msg) { - A_ArrayExpr *node = makeNode(A_ArrayExpr); - READ_LIST_FIELD(elements, elements, elements); - READ_INT_FIELD(location, location, location); + InlineCodeBlock *node = makeNode(InlineCodeBlock); + READ_STRING_FIELD(source_text, source_text, source_text); + READ_UINT_FIELD(lang_oid, langOid, langOid); + READ_BOOL_FIELD(lang_is_trusted, langIsTrusted, langIsTrusted); + READ_BOOL_FIELD(atomic, atomic, atomic); return node; } -static ResTarget * -_readResTarget(OUT_TYPE(ResTarget, ResTarget) msg) +static CallStmt * +_readCallStmt(OUT_TYPE(CallStmt, CallStmt) msg) { - ResTarget *node = makeNode(ResTarget); - READ_STRING_FIELD(name, name, name); - READ_LIST_FIELD(indirection, indirection, indirection); - READ_NODE_PTR_FIELD(val, val, val); - READ_INT_FIELD(location, location, location); + CallStmt *node = makeNode(CallStmt); + READ_SPECIFIC_NODE_PTR_FIELD(FuncCall, func_call, funccall, funccall, funccall); + READ_SPECIFIC_NODE_PTR_FIELD(FuncExpr, func_expr, funcexpr, funcexpr, funcexpr); + READ_LIST_FIELD(outargs, outargs, outargs); return node; } - -static MultiAssignRef * -_readMultiAssignRef(OUT_TYPE(MultiAssignRef, MultiAssignRef) msg) + +static CallContext * +_readCallContext(OUT_TYPE(CallContext, CallContext) msg) { - MultiAssignRef *node = makeNode(MultiAssignRef); - READ_NODE_PTR_FIELD(source, source, source); - READ_INT_FIELD(colno, colno, colno); - READ_INT_FIELD(ncolumns, ncolumns, ncolumns); + CallContext *node = makeNode(CallContext); + READ_BOOL_FIELD(atomic, atomic, atomic); return node; } -static TypeCast * -_readTypeCast(OUT_TYPE(TypeCast, TypeCast) msg) +static RenameStmt * +_readRenameStmt(OUT_TYPE(RenameStmt, RenameStmt) msg) { - TypeCast *node = makeNode(TypeCast); - READ_NODE_PTR_FIELD(arg, arg, arg); - READ_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, type_name, typeName, typeName); - READ_INT_FIELD(location, location, location); + RenameStmt *node = makeNode(RenameStmt); + READ_ENUM_FIELD(ObjectType, rename_type, renameType, renameType); + READ_ENUM_FIELD(ObjectType, relation_type, relationType, relationType); + READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); + READ_NODE_PTR_FIELD(object, object, object); + READ_STRING_FIELD(subname, subname, subname); + READ_STRING_FIELD(newname, newname, newname); + READ_ENUM_FIELD(DropBehavior, behavior, behavior, behavior); + READ_BOOL_FIELD(missing_ok, missing_ok, missing_ok); return node; } -static CollateClause * -_readCollateClause(OUT_TYPE(CollateClause, CollateClause) msg) +static AlterObjectDependsStmt * +_readAlterObjectDependsStmt(OUT_TYPE(AlterObjectDependsStmt, AlterObjectDependsStmt) msg) { - CollateClause *node = makeNode(CollateClause); - READ_NODE_PTR_FIELD(arg, arg, arg); - READ_LIST_FIELD(collname, collname, collname); - READ_INT_FIELD(location, location, location); + AlterObjectDependsStmt *node = makeNode(AlterObjectDependsStmt); + READ_ENUM_FIELD(ObjectType, object_type, objectType, objectType); + READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); + READ_NODE_PTR_FIELD(object, object, object); + READ_SPECIFIC_NODE_PTR_FIELD(String, string, extname, extname, extname); + READ_BOOL_FIELD(remove, remove, remove); return node; } -static SortBy * -_readSortBy(OUT_TYPE(SortBy, SortBy) msg) +static AlterObjectSchemaStmt * +_readAlterObjectSchemaStmt(OUT_TYPE(AlterObjectSchemaStmt, AlterObjectSchemaStmt) msg) { - SortBy *node = makeNode(SortBy); - READ_NODE_PTR_FIELD(node, node, node); - READ_ENUM_FIELD(SortByDir, sortby_dir, sortby_dir, sortby_dir); - READ_ENUM_FIELD(SortByNulls, sortby_nulls, sortby_nulls, sortby_nulls); - READ_LIST_FIELD(use_op, useOp, useOp); - READ_INT_FIELD(location, location, location); + AlterObjectSchemaStmt *node = makeNode(AlterObjectSchemaStmt); + READ_ENUM_FIELD(ObjectType, object_type, objectType, objectType); + READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); + READ_NODE_PTR_FIELD(object, object, object); + READ_STRING_FIELD(newschema, newschema, newschema); + READ_BOOL_FIELD(missing_ok, missing_ok, missing_ok); return node; } -static WindowDef * -_readWindowDef(OUT_TYPE(WindowDef, WindowDef) msg) +static AlterOwnerStmt * +_readAlterOwnerStmt(OUT_TYPE(AlterOwnerStmt, AlterOwnerStmt) msg) { - WindowDef *node = makeNode(WindowDef); - READ_STRING_FIELD(name, name, name); - READ_STRING_FIELD(refname, refname, refname); - READ_LIST_FIELD(partition_clause, partitionClause, partitionClause); - READ_LIST_FIELD(order_clause, orderClause, orderClause); - READ_INT_FIELD(frame_options, frameOptions, frameOptions); - READ_NODE_PTR_FIELD(start_offset, startOffset, startOffset); - READ_NODE_PTR_FIELD(end_offset, endOffset, endOffset); - READ_INT_FIELD(location, location, location); + AlterOwnerStmt *node = makeNode(AlterOwnerStmt); + READ_ENUM_FIELD(ObjectType, object_type, objectType, objectType); + READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); + READ_NODE_PTR_FIELD(object, object, object); + READ_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, newowner, newowner, newowner); return node; } -static RangeSubselect * -_readRangeSubselect(OUT_TYPE(RangeSubselect, RangeSubselect) msg) +static AlterOperatorStmt * +_readAlterOperatorStmt(OUT_TYPE(AlterOperatorStmt, AlterOperatorStmt) msg) { - RangeSubselect *node = makeNode(RangeSubselect); - READ_BOOL_FIELD(lateral, lateral, lateral); - READ_NODE_PTR_FIELD(subquery, subquery, subquery); - READ_SPECIFIC_NODE_PTR_FIELD(Alias, alias, alias, alias, alias); + AlterOperatorStmt *node = makeNode(AlterOperatorStmt); + READ_SPECIFIC_NODE_PTR_FIELD(ObjectWithArgs, object_with_args, opername, opername, opername); + READ_LIST_FIELD(options, options, options); return node; } -static RangeFunction * -_readRangeFunction(OUT_TYPE(RangeFunction, RangeFunction) msg) +static AlterTypeStmt * +_readAlterTypeStmt(OUT_TYPE(AlterTypeStmt, AlterTypeStmt) msg) { - RangeFunction *node = makeNode(RangeFunction); - READ_BOOL_FIELD(lateral, lateral, lateral); - READ_BOOL_FIELD(ordinality, ordinality, ordinality); - READ_BOOL_FIELD(is_rowsfrom, is_rowsfrom, is_rowsfrom); - READ_LIST_FIELD(functions, functions, functions); - READ_SPECIFIC_NODE_PTR_FIELD(Alias, alias, alias, alias, alias); - READ_LIST_FIELD(coldeflist, coldeflist, coldeflist); + AlterTypeStmt *node = makeNode(AlterTypeStmt); + READ_LIST_FIELD(type_name, typeName, typeName); + READ_LIST_FIELD(options, options, options); return node; } -static RangeTableSample * -_readRangeTableSample(OUT_TYPE(RangeTableSample, RangeTableSample) msg) +static RuleStmt * +_readRuleStmt(OUT_TYPE(RuleStmt, RuleStmt) msg) { - RangeTableSample *node = makeNode(RangeTableSample); - READ_NODE_PTR_FIELD(relation, relation, relation); - READ_LIST_FIELD(method, method, method); - READ_LIST_FIELD(args, args, args); - READ_NODE_PTR_FIELD(repeatable, repeatable, repeatable); - READ_INT_FIELD(location, location, location); + RuleStmt *node = makeNode(RuleStmt); + READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); + READ_STRING_FIELD(rulename, rulename, rulename); + READ_NODE_PTR_FIELD(where_clause, whereClause, whereClause); + READ_ENUM_FIELD(CmdType, event, event, event); + READ_BOOL_FIELD(instead, instead, instead); + READ_LIST_FIELD(actions, actions, actions); + READ_BOOL_FIELD(replace, replace, replace); return node; } -static RangeTableFunc * -_readRangeTableFunc(OUT_TYPE(RangeTableFunc, RangeTableFunc) msg) +static NotifyStmt * +_readNotifyStmt(OUT_TYPE(NotifyStmt, NotifyStmt) msg) { - RangeTableFunc *node = makeNode(RangeTableFunc); - READ_BOOL_FIELD(lateral, lateral, lateral); - READ_NODE_PTR_FIELD(docexpr, docexpr, docexpr); - READ_NODE_PTR_FIELD(rowexpr, rowexpr, rowexpr); - READ_LIST_FIELD(namespaces, namespaces, namespaces); - READ_LIST_FIELD(columns, columns, columns); - READ_SPECIFIC_NODE_PTR_FIELD(Alias, alias, alias, alias, alias); - READ_INT_FIELD(location, location, location); + NotifyStmt *node = makeNode(NotifyStmt); + READ_STRING_FIELD(conditionname, conditionname, conditionname); + READ_STRING_FIELD(payload, payload, payload); return node; } -static RangeTableFuncCol * -_readRangeTableFuncCol(OUT_TYPE(RangeTableFuncCol, RangeTableFuncCol) msg) +static ListenStmt * +_readListenStmt(OUT_TYPE(ListenStmt, ListenStmt) msg) { - RangeTableFuncCol *node = makeNode(RangeTableFuncCol); - READ_STRING_FIELD(colname, colname, colname); - READ_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, type_name, typeName, typeName); - READ_BOOL_FIELD(for_ordinality, for_ordinality, for_ordinality); - READ_BOOL_FIELD(is_not_null, is_not_null, is_not_null); - READ_NODE_PTR_FIELD(colexpr, colexpr, colexpr); - READ_NODE_PTR_FIELD(coldefexpr, coldefexpr, coldefexpr); - READ_INT_FIELD(location, location, location); + ListenStmt *node = makeNode(ListenStmt); + READ_STRING_FIELD(conditionname, conditionname, conditionname); return node; } -static TypeName * -_readTypeName(OUT_TYPE(TypeName, TypeName) msg) +static UnlistenStmt * +_readUnlistenStmt(OUT_TYPE(UnlistenStmt, UnlistenStmt) msg) { - TypeName *node = makeNode(TypeName); - READ_LIST_FIELD(names, names, names); - READ_UINT_FIELD(type_oid, typeOid, typeOid); - READ_BOOL_FIELD(setof, setof, setof); - READ_BOOL_FIELD(pct_type, pct_type, pct_type); - READ_LIST_FIELD(typmods, typmods, typmods); - READ_INT_FIELD(typemod, typemod, typemod); - READ_LIST_FIELD(array_bounds, arrayBounds, arrayBounds); - READ_INT_FIELD(location, location, location); + UnlistenStmt *node = makeNode(UnlistenStmt); + READ_STRING_FIELD(conditionname, conditionname, conditionname); return node; } -static ColumnDef * -_readColumnDef(OUT_TYPE(ColumnDef, ColumnDef) msg) +static TransactionStmt * +_readTransactionStmt(OUT_TYPE(TransactionStmt, TransactionStmt) msg) { - ColumnDef *node = makeNode(ColumnDef); - READ_STRING_FIELD(colname, colname, colname); - READ_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, type_name, typeName, typeName); - READ_STRING_FIELD(compression, compression, compression); - READ_INT_FIELD(inhcount, inhcount, inhcount); - READ_BOOL_FIELD(is_local, is_local, is_local); - READ_BOOL_FIELD(is_not_null, is_not_null, is_not_null); - READ_BOOL_FIELD(is_from_type, is_from_type, is_from_type); - READ_CHAR_FIELD(storage, storage, storage); - READ_NODE_PTR_FIELD(raw_default, raw_default, raw_default); - READ_NODE_PTR_FIELD(cooked_default, cooked_default, cooked_default); - READ_CHAR_FIELD(identity, identity, identity); - READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, identity_sequence, identitySequence, identitySequence); - READ_CHAR_FIELD(generated, generated, generated); - READ_SPECIFIC_NODE_PTR_FIELD(CollateClause, collate_clause, coll_clause, collClause, collClause); - READ_UINT_FIELD(coll_oid, collOid, collOid); - READ_LIST_FIELD(constraints, constraints, constraints); - READ_LIST_FIELD(fdwoptions, fdwoptions, fdwoptions); - READ_INT_FIELD(location, location, location); + TransactionStmt *node = makeNode(TransactionStmt); + READ_ENUM_FIELD(TransactionStmtKind, kind, kind, kind); + READ_LIST_FIELD(options, options, options); + READ_STRING_FIELD(savepoint_name, savepoint_name, savepoint_name); + READ_STRING_FIELD(gid, gid, gid); + READ_BOOL_FIELD(chain, chain, chain); return node; } -static IndexElem * -_readIndexElem(OUT_TYPE(IndexElem, IndexElem) msg) +static CompositeTypeStmt * +_readCompositeTypeStmt(OUT_TYPE(CompositeTypeStmt, CompositeTypeStmt) msg) { - IndexElem *node = makeNode(IndexElem); - READ_STRING_FIELD(name, name, name); - READ_NODE_PTR_FIELD(expr, expr, expr); - READ_STRING_FIELD(indexcolname, indexcolname, indexcolname); - READ_LIST_FIELD(collation, collation, collation); - READ_LIST_FIELD(opclass, opclass, opclass); - READ_LIST_FIELD(opclassopts, opclassopts, opclassopts); - READ_ENUM_FIELD(SortByDir, ordering, ordering, ordering); - READ_ENUM_FIELD(SortByNulls, nulls_ordering, nulls_ordering, nulls_ordering); + CompositeTypeStmt *node = makeNode(CompositeTypeStmt); + READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, typevar, typevar, typevar); + READ_LIST_FIELD(coldeflist, coldeflist, coldeflist); return node; } -static StatsElem * -_readStatsElem(OUT_TYPE(StatsElem, StatsElem) msg) +static CreateEnumStmt * +_readCreateEnumStmt(OUT_TYPE(CreateEnumStmt, CreateEnumStmt) msg) { - StatsElem *node = makeNode(StatsElem); - READ_STRING_FIELD(name, name, name); - READ_NODE_PTR_FIELD(expr, expr, expr); + CreateEnumStmt *node = makeNode(CreateEnumStmt); + READ_LIST_FIELD(type_name, typeName, typeName); + READ_LIST_FIELD(vals, vals, vals); return node; } -static Constraint * -_readConstraint(OUT_TYPE(Constraint, Constraint) msg) +static CreateRangeStmt * +_readCreateRangeStmt(OUT_TYPE(CreateRangeStmt, CreateRangeStmt) msg) { - Constraint *node = makeNode(Constraint); - READ_ENUM_FIELD(ConstrType, contype, contype, contype); - READ_STRING_FIELD(conname, conname, conname); - READ_BOOL_FIELD(deferrable, deferrable, deferrable); - READ_BOOL_FIELD(initdeferred, initdeferred, initdeferred); - READ_INT_FIELD(location, location, location); - READ_BOOL_FIELD(is_no_inherit, is_no_inherit, is_no_inherit); - READ_NODE_PTR_FIELD(raw_expr, raw_expr, raw_expr); - READ_STRING_FIELD(cooked_expr, cooked_expr, cooked_expr); - READ_CHAR_FIELD(generated_when, generated_when, generated_when); - READ_BOOL_FIELD(nulls_not_distinct, nulls_not_distinct, nulls_not_distinct); - READ_LIST_FIELD(keys, keys, keys); - READ_LIST_FIELD(including, including, including); - READ_LIST_FIELD(exclusions, exclusions, exclusions); - READ_LIST_FIELD(options, options, options); - READ_STRING_FIELD(indexname, indexname, indexname); - READ_STRING_FIELD(indexspace, indexspace, indexspace); - READ_BOOL_FIELD(reset_default_tblspc, reset_default_tblspc, reset_default_tblspc); - READ_STRING_FIELD(access_method, access_method, access_method); - READ_NODE_PTR_FIELD(where_clause, where_clause, where_clause); - READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, pktable, pktable, pktable); - READ_LIST_FIELD(fk_attrs, fk_attrs, fk_attrs); - READ_LIST_FIELD(pk_attrs, pk_attrs, pk_attrs); - READ_CHAR_FIELD(fk_matchtype, fk_matchtype, fk_matchtype); - READ_CHAR_FIELD(fk_upd_action, fk_upd_action, fk_upd_action); - READ_CHAR_FIELD(fk_del_action, fk_del_action, fk_del_action); - READ_LIST_FIELD(fk_del_set_cols, fk_del_set_cols, fk_del_set_cols); - READ_LIST_FIELD(old_conpfeqop, old_conpfeqop, old_conpfeqop); - READ_UINT_FIELD(old_pktable_oid, old_pktable_oid, old_pktable_oid); - READ_BOOL_FIELD(skip_validation, skip_validation, skip_validation); - READ_BOOL_FIELD(initially_valid, initially_valid, initially_valid); + CreateRangeStmt *node = makeNode(CreateRangeStmt); + READ_LIST_FIELD(type_name, typeName, typeName); + READ_LIST_FIELD(params, params, params); return node; } -static DefElem * -_readDefElem(OUT_TYPE(DefElem, DefElem) msg) +static AlterEnumStmt * +_readAlterEnumStmt(OUT_TYPE(AlterEnumStmt, AlterEnumStmt) msg) { - DefElem *node = makeNode(DefElem); - READ_STRING_FIELD(defnamespace, defnamespace, defnamespace); - READ_STRING_FIELD(defname, defname, defname); - READ_NODE_PTR_FIELD(arg, arg, arg); - READ_ENUM_FIELD(DefElemAction, defaction, defaction, defaction); - READ_INT_FIELD(location, location, location); + AlterEnumStmt *node = makeNode(AlterEnumStmt); + READ_LIST_FIELD(type_name, typeName, typeName); + READ_STRING_FIELD(old_val, oldVal, oldVal); + READ_STRING_FIELD(new_val, newVal, newVal); + READ_STRING_FIELD(new_val_neighbor, newValNeighbor, newValNeighbor); + READ_BOOL_FIELD(new_val_is_after, newValIsAfter, newValIsAfter); + READ_BOOL_FIELD(skip_if_new_val_exists, skipIfNewValExists, skipIfNewValExists); return node; } -static RangeTblEntry * -_readRangeTblEntry(OUT_TYPE(RangeTblEntry, RangeTblEntry) msg) +static ViewStmt * +_readViewStmt(OUT_TYPE(ViewStmt, ViewStmt) msg) { - RangeTblEntry *node = makeNode(RangeTblEntry); - READ_ENUM_FIELD(RTEKind, rtekind, rtekind, rtekind); - READ_UINT_FIELD(relid, relid, relid); - READ_CHAR_FIELD(relkind, relkind, relkind); - READ_INT_FIELD(rellockmode, rellockmode, rellockmode); - READ_SPECIFIC_NODE_PTR_FIELD(TableSampleClause, table_sample_clause, tablesample, tablesample, tablesample); - READ_SPECIFIC_NODE_PTR_FIELD(Query, query, subquery, subquery, subquery); - READ_BOOL_FIELD(security_barrier, security_barrier, security_barrier); - READ_ENUM_FIELD(JoinType, jointype, jointype, jointype); - READ_INT_FIELD(joinmergedcols, joinmergedcols, joinmergedcols); - READ_LIST_FIELD(joinaliasvars, joinaliasvars, joinaliasvars); - READ_LIST_FIELD(joinleftcols, joinleftcols, joinleftcols); - READ_LIST_FIELD(joinrightcols, joinrightcols, joinrightcols); - READ_SPECIFIC_NODE_PTR_FIELD(Alias, alias, join_using_alias, join_using_alias, join_using_alias); - READ_LIST_FIELD(functions, functions, functions); - READ_BOOL_FIELD(funcordinality, funcordinality, funcordinality); - READ_SPECIFIC_NODE_PTR_FIELD(TableFunc, table_func, tablefunc, tablefunc, tablefunc); - READ_LIST_FIELD(values_lists, values_lists, values_lists); - READ_STRING_FIELD(ctename, ctename, ctename); - READ_UINT_FIELD(ctelevelsup, ctelevelsup, ctelevelsup); - READ_BOOL_FIELD(self_reference, self_reference, self_reference); - READ_LIST_FIELD(coltypes, coltypes, coltypes); - READ_LIST_FIELD(coltypmods, coltypmods, coltypmods); - READ_LIST_FIELD(colcollations, colcollations, colcollations); - READ_STRING_FIELD(enrname, enrname, enrname); - READ_FLOAT_FIELD(enrtuples, enrtuples, enrtuples); - READ_SPECIFIC_NODE_PTR_FIELD(Alias, alias, alias, alias, alias); - READ_SPECIFIC_NODE_PTR_FIELD(Alias, alias, eref, eref, eref); - READ_BOOL_FIELD(lateral, lateral, lateral); - READ_BOOL_FIELD(inh, inh, inh); - READ_BOOL_FIELD(in_from_cl, inFromCl, inFromCl); - READ_UINT_FIELD(required_perms, requiredPerms, requiredPerms); - READ_UINT_FIELD(check_as_user, checkAsUser, checkAsUser); - READ_BITMAPSET_FIELD(selected_cols, selectedCols, selectedCols); - READ_BITMAPSET_FIELD(inserted_cols, insertedCols, insertedCols); - READ_BITMAPSET_FIELD(updated_cols, updatedCols, updatedCols); - READ_BITMAPSET_FIELD(extra_updated_cols, extraUpdatedCols, extraUpdatedCols); - READ_LIST_FIELD(security_quals, securityQuals, securityQuals); + ViewStmt *node = makeNode(ViewStmt); + READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, view, view, view); + READ_LIST_FIELD(aliases, aliases, aliases); + READ_NODE_PTR_FIELD(query, query, query); + READ_BOOL_FIELD(replace, replace, replace); + READ_LIST_FIELD(options, options, options); + READ_ENUM_FIELD(ViewCheckOption, with_check_option, withCheckOption, withCheckOption); return node; } -static RangeTblFunction * -_readRangeTblFunction(OUT_TYPE(RangeTblFunction, RangeTblFunction) msg) +static LoadStmt * +_readLoadStmt(OUT_TYPE(LoadStmt, LoadStmt) msg) { - RangeTblFunction *node = makeNode(RangeTblFunction); - READ_NODE_PTR_FIELD(funcexpr, funcexpr, funcexpr); - READ_INT_FIELD(funccolcount, funccolcount, funccolcount); - READ_LIST_FIELD(funccolnames, funccolnames, funccolnames); - READ_LIST_FIELD(funccoltypes, funccoltypes, funccoltypes); - READ_LIST_FIELD(funccoltypmods, funccoltypmods, funccoltypmods); - READ_LIST_FIELD(funccolcollations, funccolcollations, funccolcollations); - READ_BITMAPSET_FIELD(funcparams, funcparams, funcparams); + LoadStmt *node = makeNode(LoadStmt); + READ_STRING_FIELD(filename, filename, filename); return node; } -static TableSampleClause * -_readTableSampleClause(OUT_TYPE(TableSampleClause, TableSampleClause) msg) +static CreatedbStmt * +_readCreatedbStmt(OUT_TYPE(CreatedbStmt, CreatedbStmt) msg) { - TableSampleClause *node = makeNode(TableSampleClause); - READ_UINT_FIELD(tsmhandler, tsmhandler, tsmhandler); - READ_LIST_FIELD(args, args, args); - READ_EXPR_PTR_FIELD(repeatable, repeatable, repeatable); + CreatedbStmt *node = makeNode(CreatedbStmt); + READ_STRING_FIELD(dbname, dbname, dbname); + READ_LIST_FIELD(options, options, options); return node; } -static WithCheckOption * -_readWithCheckOption(OUT_TYPE(WithCheckOption, WithCheckOption) msg) +static AlterDatabaseStmt * +_readAlterDatabaseStmt(OUT_TYPE(AlterDatabaseStmt, AlterDatabaseStmt) msg) { - WithCheckOption *node = makeNode(WithCheckOption); - READ_ENUM_FIELD(WCOKind, kind, kind, kind); - READ_STRING_FIELD(relname, relname, relname); - READ_STRING_FIELD(polname, polname, polname); - READ_NODE_PTR_FIELD(qual, qual, qual); - READ_BOOL_FIELD(cascaded, cascaded, cascaded); + AlterDatabaseStmt *node = makeNode(AlterDatabaseStmt); + READ_STRING_FIELD(dbname, dbname, dbname); + READ_LIST_FIELD(options, options, options); return node; } -static SortGroupClause * -_readSortGroupClause(OUT_TYPE(SortGroupClause, SortGroupClause) msg) +static AlterDatabaseRefreshCollStmt * +_readAlterDatabaseRefreshCollStmt(OUT_TYPE(AlterDatabaseRefreshCollStmt, AlterDatabaseRefreshCollStmt) msg) { - SortGroupClause *node = makeNode(SortGroupClause); - READ_UINT_FIELD(tle_sort_group_ref, tleSortGroupRef, tleSortGroupRef); - READ_UINT_FIELD(eqop, eqop, eqop); - READ_UINT_FIELD(sortop, sortop, sortop); - READ_BOOL_FIELD(nulls_first, nulls_first, nulls_first); - READ_BOOL_FIELD(hashable, hashable, hashable); + AlterDatabaseRefreshCollStmt *node = makeNode(AlterDatabaseRefreshCollStmt); + READ_STRING_FIELD(dbname, dbname, dbname); return node; } -static GroupingSet * -_readGroupingSet(OUT_TYPE(GroupingSet, GroupingSet) msg) +static AlterDatabaseSetStmt * +_readAlterDatabaseSetStmt(OUT_TYPE(AlterDatabaseSetStmt, AlterDatabaseSetStmt) msg) { - GroupingSet *node = makeNode(GroupingSet); - READ_ENUM_FIELD(GroupingSetKind, kind, kind, kind); - READ_LIST_FIELD(content, content, content); - READ_INT_FIELD(location, location, location); + AlterDatabaseSetStmt *node = makeNode(AlterDatabaseSetStmt); + READ_STRING_FIELD(dbname, dbname, dbname); + READ_SPECIFIC_NODE_PTR_FIELD(VariableSetStmt, variable_set_stmt, setstmt, setstmt, setstmt); return node; } -static WindowClause * -_readWindowClause(OUT_TYPE(WindowClause, WindowClause) msg) +static DropdbStmt * +_readDropdbStmt(OUT_TYPE(DropdbStmt, DropdbStmt) msg) { - WindowClause *node = makeNode(WindowClause); - READ_STRING_FIELD(name, name, name); - READ_STRING_FIELD(refname, refname, refname); - READ_LIST_FIELD(partition_clause, partitionClause, partitionClause); - READ_LIST_FIELD(order_clause, orderClause, orderClause); - READ_INT_FIELD(frame_options, frameOptions, frameOptions); - READ_NODE_PTR_FIELD(start_offset, startOffset, startOffset); - READ_NODE_PTR_FIELD(end_offset, endOffset, endOffset); - READ_LIST_FIELD(run_condition, runCondition, runCondition); - READ_UINT_FIELD(start_in_range_func, startInRangeFunc, startInRangeFunc); - READ_UINT_FIELD(end_in_range_func, endInRangeFunc, endInRangeFunc); - READ_UINT_FIELD(in_range_coll, inRangeColl, inRangeColl); - READ_BOOL_FIELD(in_range_asc, inRangeAsc, inRangeAsc); - READ_BOOL_FIELD(in_range_nulls_first, inRangeNullsFirst, inRangeNullsFirst); - READ_UINT_FIELD(winref, winref, winref); - READ_BOOL_FIELD(copied_order, copiedOrder, copiedOrder); + DropdbStmt *node = makeNode(DropdbStmt); + READ_STRING_FIELD(dbname, dbname, dbname); + READ_BOOL_FIELD(missing_ok, missing_ok, missing_ok); + READ_LIST_FIELD(options, options, options); return node; } -static ObjectWithArgs * -_readObjectWithArgs(OUT_TYPE(ObjectWithArgs, ObjectWithArgs) msg) +static AlterSystemStmt * +_readAlterSystemStmt(OUT_TYPE(AlterSystemStmt, AlterSystemStmt) msg) { - ObjectWithArgs *node = makeNode(ObjectWithArgs); - READ_LIST_FIELD(objname, objname, objname); - READ_LIST_FIELD(objargs, objargs, objargs); - READ_LIST_FIELD(objfuncargs, objfuncargs, objfuncargs); - READ_BOOL_FIELD(args_unspecified, args_unspecified, args_unspecified); + AlterSystemStmt *node = makeNode(AlterSystemStmt); + READ_SPECIFIC_NODE_PTR_FIELD(VariableSetStmt, variable_set_stmt, setstmt, setstmt, setstmt); return node; } -static AccessPriv * -_readAccessPriv(OUT_TYPE(AccessPriv, AccessPriv) msg) +static ClusterStmt * +_readClusterStmt(OUT_TYPE(ClusterStmt, ClusterStmt) msg) { - AccessPriv *node = makeNode(AccessPriv); - READ_STRING_FIELD(priv_name, priv_name, priv_name); - READ_LIST_FIELD(cols, cols, cols); + ClusterStmt *node = makeNode(ClusterStmt); + READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); + READ_STRING_FIELD(indexname, indexname, indexname); + READ_LIST_FIELD(params, params, params); return node; } -static CreateOpClassItem * -_readCreateOpClassItem(OUT_TYPE(CreateOpClassItem, CreateOpClassItem) msg) +static VacuumStmt * +_readVacuumStmt(OUT_TYPE(VacuumStmt, VacuumStmt) msg) { - CreateOpClassItem *node = makeNode(CreateOpClassItem); - READ_INT_FIELD(itemtype, itemtype, itemtype); - READ_SPECIFIC_NODE_PTR_FIELD(ObjectWithArgs, object_with_args, name, name, name); - READ_INT_FIELD(number, number, number); - READ_LIST_FIELD(order_family, order_family, order_family); - READ_LIST_FIELD(class_args, class_args, class_args); - READ_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, storedtype, storedtype, storedtype); + VacuumStmt *node = makeNode(VacuumStmt); + READ_LIST_FIELD(options, options, options); + READ_LIST_FIELD(rels, rels, rels); + READ_BOOL_FIELD(is_vacuumcmd, is_vacuumcmd, is_vacuumcmd); return node; } -static TableLikeClause * -_readTableLikeClause(OUT_TYPE(TableLikeClause, TableLikeClause) msg) +static VacuumRelation * +_readVacuumRelation(OUT_TYPE(VacuumRelation, VacuumRelation) msg) { - TableLikeClause *node = makeNode(TableLikeClause); + VacuumRelation *node = makeNode(VacuumRelation); READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); - READ_UINT_FIELD(options, options, options); - READ_UINT_FIELD(relation_oid, relationOid, relationOid); + READ_UINT_FIELD(oid, oid, oid); + READ_LIST_FIELD(va_cols, va_cols, va_cols); return node; } -static FunctionParameter * -_readFunctionParameter(OUT_TYPE(FunctionParameter, FunctionParameter) msg) +static ExplainStmt * +_readExplainStmt(OUT_TYPE(ExplainStmt, ExplainStmt) msg) { - FunctionParameter *node = makeNode(FunctionParameter); - READ_STRING_FIELD(name, name, name); - READ_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, arg_type, argType, argType); - READ_ENUM_FIELD(FunctionParameterMode, mode, mode, mode); - READ_NODE_PTR_FIELD(defexpr, defexpr, defexpr); + ExplainStmt *node = makeNode(ExplainStmt); + READ_NODE_PTR_FIELD(query, query, query); + READ_LIST_FIELD(options, options, options); return node; } -static LockingClause * -_readLockingClause(OUT_TYPE(LockingClause, LockingClause) msg) +static CreateTableAsStmt * +_readCreateTableAsStmt(OUT_TYPE(CreateTableAsStmt, CreateTableAsStmt) msg) { - LockingClause *node = makeNode(LockingClause); - READ_LIST_FIELD(locked_rels, lockedRels, lockedRels); - READ_ENUM_FIELD(LockClauseStrength, strength, strength, strength); - READ_ENUM_FIELD(LockWaitPolicy, wait_policy, waitPolicy, waitPolicy); + CreateTableAsStmt *node = makeNode(CreateTableAsStmt); + READ_NODE_PTR_FIELD(query, query, query); + READ_SPECIFIC_NODE_PTR_FIELD(IntoClause, into_clause, into, into, into); + READ_ENUM_FIELD(ObjectType, objtype, objtype, objtype); + READ_BOOL_FIELD(is_select_into, is_select_into, is_select_into); + READ_BOOL_FIELD(if_not_exists, if_not_exists, if_not_exists); return node; } -static RowMarkClause * -_readRowMarkClause(OUT_TYPE(RowMarkClause, RowMarkClause) msg) +static RefreshMatViewStmt * +_readRefreshMatViewStmt(OUT_TYPE(RefreshMatViewStmt, RefreshMatViewStmt) msg) { - RowMarkClause *node = makeNode(RowMarkClause); - READ_UINT_FIELD(rti, rti, rti); - READ_ENUM_FIELD(LockClauseStrength, strength, strength, strength); - READ_ENUM_FIELD(LockWaitPolicy, wait_policy, waitPolicy, waitPolicy); - READ_BOOL_FIELD(pushed_down, pushedDown, pushedDown); + RefreshMatViewStmt *node = makeNode(RefreshMatViewStmt); + READ_BOOL_FIELD(concurrent, concurrent, concurrent); + READ_BOOL_FIELD(skip_data, skipData, skipData); + READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); return node; } -static XmlSerialize * -_readXmlSerialize(OUT_TYPE(XmlSerialize, XmlSerialize) msg) +static CheckPointStmt * +_readCheckPointStmt(OUT_TYPE(CheckPointStmt, CheckPointStmt) msg) { - XmlSerialize *node = makeNode(XmlSerialize); - READ_ENUM_FIELD(XmlOptionType, xmloption, xmloption, xmloption); - READ_NODE_PTR_FIELD(expr, expr, expr); - READ_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, type_name, typeName, typeName); - READ_INT_FIELD(location, location, location); + CheckPointStmt *node = makeNode(CheckPointStmt); return node; } -static WithClause * -_readWithClause(OUT_TYPE(WithClause, WithClause) msg) +static DiscardStmt * +_readDiscardStmt(OUT_TYPE(DiscardStmt, DiscardStmt) msg) { - WithClause *node = makeNode(WithClause); - READ_LIST_FIELD(ctes, ctes, ctes); - READ_BOOL_FIELD(recursive, recursive, recursive); - READ_INT_FIELD(location, location, location); + DiscardStmt *node = makeNode(DiscardStmt); + READ_ENUM_FIELD(DiscardMode, target, target, target); return node; } - -static InferClause * -_readInferClause(OUT_TYPE(InferClause, InferClause) msg) + +static LockStmt * +_readLockStmt(OUT_TYPE(LockStmt, LockStmt) msg) { - InferClause *node = makeNode(InferClause); - READ_LIST_FIELD(index_elems, indexElems, indexElems); - READ_NODE_PTR_FIELD(where_clause, whereClause, whereClause); - READ_STRING_FIELD(conname, conname, conname); - READ_INT_FIELD(location, location, location); + LockStmt *node = makeNode(LockStmt); + READ_LIST_FIELD(relations, relations, relations); + READ_INT_FIELD(mode, mode, mode); + READ_BOOL_FIELD(nowait, nowait, nowait); return node; } -static OnConflictClause * -_readOnConflictClause(OUT_TYPE(OnConflictClause, OnConflictClause) msg) +static ConstraintsSetStmt * +_readConstraintsSetStmt(OUT_TYPE(ConstraintsSetStmt, ConstraintsSetStmt) msg) { - OnConflictClause *node = makeNode(OnConflictClause); - READ_ENUM_FIELD(OnConflictAction, action, action, action); - READ_SPECIFIC_NODE_PTR_FIELD(InferClause, infer_clause, infer, infer, infer); - READ_LIST_FIELD(target_list, targetList, targetList); - READ_NODE_PTR_FIELD(where_clause, whereClause, whereClause); - READ_INT_FIELD(location, location, location); + ConstraintsSetStmt *node = makeNode(ConstraintsSetStmt); + READ_LIST_FIELD(constraints, constraints, constraints); + READ_BOOL_FIELD(deferred, deferred, deferred); return node; } -static CTESearchClause * -_readCTESearchClause(OUT_TYPE(CTESearchClause, CTESearchClause) msg) +static ReindexStmt * +_readReindexStmt(OUT_TYPE(ReindexStmt, ReindexStmt) msg) { - CTESearchClause *node = makeNode(CTESearchClause); - READ_LIST_FIELD(search_col_list, search_col_list, search_col_list); - READ_BOOL_FIELD(search_breadth_first, search_breadth_first, search_breadth_first); - READ_STRING_FIELD(search_seq_column, search_seq_column, search_seq_column); - READ_INT_FIELD(location, location, location); + ReindexStmt *node = makeNode(ReindexStmt); + READ_ENUM_FIELD(ReindexObjectType, kind, kind, kind); + READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); + READ_STRING_FIELD(name, name, name); + READ_LIST_FIELD(params, params, params); return node; } -static CTECycleClause * -_readCTECycleClause(OUT_TYPE(CTECycleClause, CTECycleClause) msg) +static CreateConversionStmt * +_readCreateConversionStmt(OUT_TYPE(CreateConversionStmt, CreateConversionStmt) msg) { - CTECycleClause *node = makeNode(CTECycleClause); - READ_LIST_FIELD(cycle_col_list, cycle_col_list, cycle_col_list); - READ_STRING_FIELD(cycle_mark_column, cycle_mark_column, cycle_mark_column); - READ_NODE_PTR_FIELD(cycle_mark_value, cycle_mark_value, cycle_mark_value); - READ_NODE_PTR_FIELD(cycle_mark_default, cycle_mark_default, cycle_mark_default); - READ_STRING_FIELD(cycle_path_column, cycle_path_column, cycle_path_column); - READ_INT_FIELD(location, location, location); - READ_UINT_FIELD(cycle_mark_type, cycle_mark_type, cycle_mark_type); - READ_INT_FIELD(cycle_mark_typmod, cycle_mark_typmod, cycle_mark_typmod); - READ_UINT_FIELD(cycle_mark_collation, cycle_mark_collation, cycle_mark_collation); - READ_UINT_FIELD(cycle_mark_neop, cycle_mark_neop, cycle_mark_neop); + CreateConversionStmt *node = makeNode(CreateConversionStmt); + READ_LIST_FIELD(conversion_name, conversion_name, conversion_name); + READ_STRING_FIELD(for_encoding_name, for_encoding_name, for_encoding_name); + READ_STRING_FIELD(to_encoding_name, to_encoding_name, to_encoding_name); + READ_LIST_FIELD(func_name, func_name, func_name); + READ_BOOL_FIELD(def, def, def); return node; } -static CommonTableExpr * -_readCommonTableExpr(OUT_TYPE(CommonTableExpr, CommonTableExpr) msg) +static CreateCastStmt * +_readCreateCastStmt(OUT_TYPE(CreateCastStmt, CreateCastStmt) msg) { - CommonTableExpr *node = makeNode(CommonTableExpr); - READ_STRING_FIELD(ctename, ctename, ctename); - READ_LIST_FIELD(aliascolnames, aliascolnames, aliascolnames); - READ_ENUM_FIELD(CTEMaterialize, ctematerialized, ctematerialized, ctematerialized); - READ_NODE_PTR_FIELD(ctequery, ctequery, ctequery); - READ_SPECIFIC_NODE_PTR_FIELD(CTESearchClause, ctesearch_clause, search_clause, search_clause, search_clause); - READ_SPECIFIC_NODE_PTR_FIELD(CTECycleClause, ctecycle_clause, cycle_clause, cycle_clause, cycle_clause); - READ_INT_FIELD(location, location, location); - READ_BOOL_FIELD(cterecursive, cterecursive, cterecursive); - READ_INT_FIELD(cterefcount, cterefcount, cterefcount); - READ_LIST_FIELD(ctecolnames, ctecolnames, ctecolnames); - READ_LIST_FIELD(ctecoltypes, ctecoltypes, ctecoltypes); - READ_LIST_FIELD(ctecoltypmods, ctecoltypmods, ctecoltypmods); - READ_LIST_FIELD(ctecolcollations, ctecolcollations, ctecolcollations); + CreateCastStmt *node = makeNode(CreateCastStmt); + READ_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, sourcetype, sourcetype, sourcetype); + READ_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, targettype, targettype, targettype); + READ_SPECIFIC_NODE_PTR_FIELD(ObjectWithArgs, object_with_args, func, func, func); + READ_ENUM_FIELD(CoercionContext, context, context, context); + READ_BOOL_FIELD(inout, inout, inout); return node; } -static MergeWhenClause * -_readMergeWhenClause(OUT_TYPE(MergeWhenClause, MergeWhenClause) msg) +static CreateTransformStmt * +_readCreateTransformStmt(OUT_TYPE(CreateTransformStmt, CreateTransformStmt) msg) { - MergeWhenClause *node = makeNode(MergeWhenClause); - READ_BOOL_FIELD(matched, matched, matched); - READ_ENUM_FIELD(CmdType, command_type, commandType, commandType); - READ_ENUM_FIELD(OverridingKind, override, override, override); - READ_NODE_PTR_FIELD(condition, condition, condition); - READ_LIST_FIELD(target_list, targetList, targetList); - READ_LIST_FIELD(values, values, values); + CreateTransformStmt *node = makeNode(CreateTransformStmt); + READ_BOOL_FIELD(replace, replace, replace); + READ_SPECIFIC_NODE_PTR_FIELD(TypeName, type_name, type_name, type_name, type_name); + READ_STRING_FIELD(lang, lang, lang); + READ_SPECIFIC_NODE_PTR_FIELD(ObjectWithArgs, object_with_args, fromsql, fromsql, fromsql); + READ_SPECIFIC_NODE_PTR_FIELD(ObjectWithArgs, object_with_args, tosql, tosql, tosql); return node; } -static RoleSpec * -_readRoleSpec(OUT_TYPE(RoleSpec, RoleSpec) msg) +static PrepareStmt * +_readPrepareStmt(OUT_TYPE(PrepareStmt, PrepareStmt) msg) { - RoleSpec *node = makeNode(RoleSpec); - READ_ENUM_FIELD(RoleSpecType, roletype, roletype, roletype); - READ_STRING_FIELD(rolename, rolename, rolename); - READ_INT_FIELD(location, location, location); + PrepareStmt *node = makeNode(PrepareStmt); + READ_STRING_FIELD(name, name, name); + READ_LIST_FIELD(argtypes, argtypes, argtypes); + READ_NODE_PTR_FIELD(query, query, query); return node; } -static TriggerTransition * -_readTriggerTransition(OUT_TYPE(TriggerTransition, TriggerTransition) msg) +static ExecuteStmt * +_readExecuteStmt(OUT_TYPE(ExecuteStmt, ExecuteStmt) msg) { - TriggerTransition *node = makeNode(TriggerTransition); + ExecuteStmt *node = makeNode(ExecuteStmt); READ_STRING_FIELD(name, name, name); - READ_BOOL_FIELD(is_new, isNew, isNew); - READ_BOOL_FIELD(is_table, isTable, isTable); + READ_LIST_FIELD(params, params, params); return node; } -static PartitionElem * -_readPartitionElem(OUT_TYPE(PartitionElem, PartitionElem) msg) +static DeallocateStmt * +_readDeallocateStmt(OUT_TYPE(DeallocateStmt, DeallocateStmt) msg) { - PartitionElem *node = makeNode(PartitionElem); + DeallocateStmt *node = makeNode(DeallocateStmt); READ_STRING_FIELD(name, name, name); - READ_NODE_PTR_FIELD(expr, expr, expr); - READ_LIST_FIELD(collation, collation, collation); - READ_LIST_FIELD(opclass, opclass, opclass); - READ_INT_FIELD(location, location, location); return node; } -static PartitionSpec * -_readPartitionSpec(OUT_TYPE(PartitionSpec, PartitionSpec) msg) +static DropOwnedStmt * +_readDropOwnedStmt(OUT_TYPE(DropOwnedStmt, DropOwnedStmt) msg) { - PartitionSpec *node = makeNode(PartitionSpec); - READ_STRING_FIELD(strategy, strategy, strategy); - READ_LIST_FIELD(part_params, partParams, partParams); - READ_INT_FIELD(location, location, location); + DropOwnedStmt *node = makeNode(DropOwnedStmt); + READ_LIST_FIELD(roles, roles, roles); + READ_ENUM_FIELD(DropBehavior, behavior, behavior, behavior); return node; } -static PartitionBoundSpec * -_readPartitionBoundSpec(OUT_TYPE(PartitionBoundSpec, PartitionBoundSpec) msg) +static ReassignOwnedStmt * +_readReassignOwnedStmt(OUT_TYPE(ReassignOwnedStmt, ReassignOwnedStmt) msg) { - PartitionBoundSpec *node = makeNode(PartitionBoundSpec); - READ_CHAR_FIELD(strategy, strategy, strategy); - READ_BOOL_FIELD(is_default, is_default, is_default); - READ_INT_FIELD(modulus, modulus, modulus); - READ_INT_FIELD(remainder, remainder, remainder); - READ_LIST_FIELD(listdatums, listdatums, listdatums); - READ_LIST_FIELD(lowerdatums, lowerdatums, lowerdatums); - READ_LIST_FIELD(upperdatums, upperdatums, upperdatums); - READ_INT_FIELD(location, location, location); + ReassignOwnedStmt *node = makeNode(ReassignOwnedStmt); + READ_LIST_FIELD(roles, roles, roles); + READ_SPECIFIC_NODE_PTR_FIELD(RoleSpec, role_spec, newrole, newrole, newrole); return node; } -static PartitionRangeDatum * -_readPartitionRangeDatum(OUT_TYPE(PartitionRangeDatum, PartitionRangeDatum) msg) +static AlterTSDictionaryStmt * +_readAlterTSDictionaryStmt(OUT_TYPE(AlterTSDictionaryStmt, AlterTSDictionaryStmt) msg) { - PartitionRangeDatum *node = makeNode(PartitionRangeDatum); - READ_ENUM_FIELD(PartitionRangeDatumKind, kind, kind, kind); - READ_NODE_PTR_FIELD(value, value, value); - READ_INT_FIELD(location, location, location); + AlterTSDictionaryStmt *node = makeNode(AlterTSDictionaryStmt); + READ_LIST_FIELD(dictname, dictname, dictname); + READ_LIST_FIELD(options, options, options); return node; } -static PartitionCmd * -_readPartitionCmd(OUT_TYPE(PartitionCmd, PartitionCmd) msg) +static AlterTSConfigurationStmt * +_readAlterTSConfigurationStmt(OUT_TYPE(AlterTSConfigurationStmt, AlterTSConfigurationStmt) msg) { - PartitionCmd *node = makeNode(PartitionCmd); - READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, name, name, name); - READ_SPECIFIC_NODE_PTR_FIELD(PartitionBoundSpec, partition_bound_spec, bound, bound, bound); - READ_BOOL_FIELD(concurrent, concurrent, concurrent); + AlterTSConfigurationStmt *node = makeNode(AlterTSConfigurationStmt); + READ_ENUM_FIELD(AlterTSConfigType, kind, kind, kind); + READ_LIST_FIELD(cfgname, cfgname, cfgname); + READ_LIST_FIELD(tokentype, tokentype, tokentype); + READ_LIST_FIELD(dicts, dicts, dicts); + READ_BOOL_FIELD(override, override, override); + READ_BOOL_FIELD(replace, replace, replace); + READ_BOOL_FIELD(missing_ok, missing_ok, missing_ok); return node; } -static VacuumRelation * -_readVacuumRelation(OUT_TYPE(VacuumRelation, VacuumRelation) msg) +static PublicationTable * +_readPublicationTable(OUT_TYPE(PublicationTable, PublicationTable) msg) { - VacuumRelation *node = makeNode(VacuumRelation); + PublicationTable *node = makeNode(PublicationTable); READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); - READ_UINT_FIELD(oid, oid, oid); - READ_LIST_FIELD(va_cols, va_cols, va_cols); + READ_NODE_PTR_FIELD(where_clause, whereClause, whereClause); + READ_LIST_FIELD(columns, columns, columns); return node; } @@ -2992,32 +3126,59 @@ _readPublicationObjSpec(OUT_TYPE(PublicationObjSpec, PublicationObjSpec) msg) return node; } -static PublicationTable * -_readPublicationTable(OUT_TYPE(PublicationTable, PublicationTable) msg) +static CreatePublicationStmt * +_readCreatePublicationStmt(OUT_TYPE(CreatePublicationStmt, CreatePublicationStmt) msg) { - PublicationTable *node = makeNode(PublicationTable); - READ_SPECIFIC_NODE_PTR_FIELD(RangeVar, range_var, relation, relation, relation); - READ_NODE_PTR_FIELD(where_clause, whereClause, whereClause); - READ_LIST_FIELD(columns, columns, columns); + CreatePublicationStmt *node = makeNode(CreatePublicationStmt); + READ_STRING_FIELD(pubname, pubname, pubname); + READ_LIST_FIELD(options, options, options); + READ_LIST_FIELD(pubobjects, pubobjects, pubobjects); + READ_BOOL_FIELD(for_all_tables, for_all_tables, for_all_tables); return node; } -static InlineCodeBlock * -_readInlineCodeBlock(OUT_TYPE(InlineCodeBlock, InlineCodeBlock) msg) +static AlterPublicationStmt * +_readAlterPublicationStmt(OUT_TYPE(AlterPublicationStmt, AlterPublicationStmt) msg) { - InlineCodeBlock *node = makeNode(InlineCodeBlock); - READ_STRING_FIELD(source_text, source_text, source_text); - READ_UINT_FIELD(lang_oid, langOid, langOid); - READ_BOOL_FIELD(lang_is_trusted, langIsTrusted, langIsTrusted); - READ_BOOL_FIELD(atomic, atomic, atomic); + AlterPublicationStmt *node = makeNode(AlterPublicationStmt); + READ_STRING_FIELD(pubname, pubname, pubname); + READ_LIST_FIELD(options, options, options); + READ_LIST_FIELD(pubobjects, pubobjects, pubobjects); + READ_BOOL_FIELD(for_all_tables, for_all_tables, for_all_tables); + READ_ENUM_FIELD(AlterPublicationAction, action, action, action); return node; } -static CallContext * -_readCallContext(OUT_TYPE(CallContext, CallContext) msg) +static CreateSubscriptionStmt * +_readCreateSubscriptionStmt(OUT_TYPE(CreateSubscriptionStmt, CreateSubscriptionStmt) msg) { - CallContext *node = makeNode(CallContext); - READ_BOOL_FIELD(atomic, atomic, atomic); + CreateSubscriptionStmt *node = makeNode(CreateSubscriptionStmt); + READ_STRING_FIELD(subname, subname, subname); + READ_STRING_FIELD(conninfo, conninfo, conninfo); + READ_LIST_FIELD(publication, publication, publication); + READ_LIST_FIELD(options, options, options); + return node; +} + +static AlterSubscriptionStmt * +_readAlterSubscriptionStmt(OUT_TYPE(AlterSubscriptionStmt, AlterSubscriptionStmt) msg) +{ + AlterSubscriptionStmt *node = makeNode(AlterSubscriptionStmt); + READ_ENUM_FIELD(AlterSubscriptionType, kind, kind, kind); + READ_STRING_FIELD(subname, subname, subname); + READ_STRING_FIELD(conninfo, conninfo, conninfo); + READ_LIST_FIELD(publication, publication, publication); + READ_LIST_FIELD(options, options, options); + return node; +} + +static DropSubscriptionStmt * +_readDropSubscriptionStmt(OUT_TYPE(DropSubscriptionStmt, DropSubscriptionStmt) msg) +{ + DropSubscriptionStmt *node = makeNode(DropSubscriptionStmt); + READ_STRING_FIELD(subname, subname, subname); + READ_BOOL_FIELD(missing_ok, missing_ok, missing_ok); + READ_ENUM_FIELD(DropBehavior, behavior, behavior, behavior); return node; } diff --git a/srcdata/struct_defs.json b/srcdata/struct_defs.json index dee0036b..beddb0e0 100644 --- a/srcdata/struct_defs.json +++ b/srcdata/struct_defs.json @@ -22,7 +22,9 @@ "comment": "\t/* where did I come from? */\n" }, { - "comment": "" + "name": "querySource", + "c_type": "QuerySource", + "comment": null }, { "comment": "" @@ -40,7 +42,9 @@ "comment": "\t/* do I set the command result tag? */\n" }, { - "comment": "" + "name": "canSetTag", + "c_type": "bool", + "comment": null }, { "comment": "" @@ -57,7 +61,9 @@ "comment": "\t/*\n\t * rtable index of target relation for INSERT/UPDATE/DELETE/MERGE; 0 for\n\t * SELECT. This is ignored in the query jumble as unrelated to the\n\t * compilation of the query ID.\n\t */\n" }, { - "comment": "" + "name": "resultRelation", + "c_type": "int", + "comment": null }, { "comment": "" @@ -66,61 +72,81 @@ "comment": "\t/* has aggregates in tlist or havingQual */\n" }, { - "comment": "" + "name": "hasAggs", + "c_type": "bool", + "comment": null }, { "comment": "\t/* has window functions in tlist */\n" }, { - "comment": "" + "name": "hasWindowFuncs", + "c_type": "bool", + "comment": null }, { "comment": "\t/* has set-returning functions in tlist */\n" }, { - "comment": "" + "name": "hasTargetSRFs", + "c_type": "bool", + "comment": null }, { "comment": "\t/* has subquery SubLink */\n" }, { - "comment": "" + "name": "hasSubLinks", + "c_type": "bool", + "comment": null }, { "comment": "\t/* distinctClause is from DISTINCT ON */\n" }, { - "comment": "" + "name": "hasDistinctOn", + "c_type": "bool", + "comment": null }, { "comment": "\t/* WITH RECURSIVE was specified */\n" }, { - "comment": "" + "name": "hasRecursive", + "c_type": "bool", + "comment": null }, { "comment": "\t/* has INSERT/UPDATE/DELETE in WITH */\n" }, { - "comment": "" + "name": "hasModifyingCTE", + "c_type": "bool", + "comment": null }, { "comment": "\t/* FOR [KEY] UPDATE/SHARE was specified */\n" }, { - "comment": "" + "name": "hasForUpdate", + "c_type": "bool", + "comment": null }, { "comment": "\t/* rewriter has applied some RLS policy */\n" }, { - "comment": "" + "name": "hasRowSecurity", + "c_type": "bool", + "comment": null }, { "comment": "\t/* is a RETURN statement */\n" }, { - "comment": "" + "name": "isReturn", + "c_type": "bool", + "comment": null }, { "comment": "" @@ -145,7 +171,9 @@ "comment": "\t/*\n\t * list of RTEPermissionInfo nodes for the rtable entries having\n\t * perminfoindex > 0\n\t */\n" }, { - "comment": "" + "name": "rteperminfos", + "c_type": "List*", + "comment": null }, { "name": "jointree", @@ -164,7 +192,9 @@ "comment": "\t/* whether to use outer join */\n" }, { - "comment": "" + "name": "mergeUseOuterJoin", + "c_type": "bool", + "comment": null }, { "comment": "" @@ -181,7 +211,9 @@ "comment": "\t/* OVERRIDING clause */\n" }, { - "comment": "" + "name": "override", + "c_type": "OverridingKind", + "comment": null }, { "comment": "" @@ -293,7 +325,9 @@ "comment": "\t/*\n\t * A list of pg_constraint OIDs that the query depends on to be\n\t * semantically valid\n\t */\n" }, { - "comment": "" + "name": "constraintDeps", + "c_type": "List*", + "comment": null }, { "comment": "" @@ -302,7 +336,9 @@ "comment": "\t/* a list of WithCheckOption's (added during rewrite) */\n" }, { - "comment": "" + "name": "withCheckOptions", + "c_type": "List*", + "comment": null }, { "comment": "" @@ -322,7 +358,9 @@ "comment": "\t/* length in bytes; 0 means \"rest of string\" */\n" }, { - "comment": "" + "name": "stmt_len", + "c_type": "int", + "comment": null } ], "comment": "/*\n * Query -\n *\t Parse analysis turns all statements into a Query tree\n *\t for further processing by the rewriter and planner.\n *\n *\t Utility statements (i.e. non-optimizable statements) have the\n *\t utilityStmt field set, and the rest of the Query is mostly dummy.\n *\n *\t Planning converts a Query tree into a Plan tree headed by a PlannedStmt\n *\t node --- the Query structure is not used by the executor.\n *\n *\t All the fields ignored for the query jumbling are not semantically\n *\t significant (such as alias names), as is ignored anything that can\n *\t be deduced from child nodes (else we'd just be double-hashing that\n *\t piece of information).\n */\n" @@ -1774,7 +1812,9 @@ "comment": "\t/* number of columns it contributes to RTE */\n" }, { - "comment": "" + "name": "funccolcount", + "c_type": "int", + "comment": null }, { "comment": "\t/* These fields record the contents of a column definition list, if any: */\n" @@ -1783,25 +1823,33 @@ "comment": "\t/* column names (list of String) */\n" }, { - "comment": "" + "name": "funccolnames", + "c_type": "List*", + "comment": null }, { "comment": "\t/* OID list of column type OIDs */\n" }, { - "comment": "" + "name": "funccoltypes", + "c_type": "List*", + "comment": null }, { "comment": "\t/* integer list of column typmods */\n" }, { - "comment": "" + "name": "funccoltypmods", + "c_type": "List*", + "comment": null }, { "comment": "\t/* OID list of column collation OIDs */\n" }, { - "comment": "" + "name": "funccolcollations", + "c_type": "List*", + "comment": null }, { "comment": "" @@ -1813,7 +1861,9 @@ "comment": "\t/* PARAM_EXEC Param IDs affecting this func */\n" }, { - "comment": "" + "name": "funcparams", + "c_type": "Bitmapset*", + "comment": null } ], "comment": "/*\n * RangeTblFunction -\n *\t RangeTblEntry subsidiary data for one function in a FUNCTION RTE.\n *\n * If the function had a column definition list (required for an\n * otherwise-unspecified RECORD result), funccolnames lists the names given\n * in the definition list, funccoltypes lists their declared column types,\n * funccoltypmods lists their typmods, funccolcollations their collations.\n * Otherwise, those fields are NIL.\n *\n * Notice we don't attempt to store info about the results of functions\n * returning named composite types, because those can change from time to\n * time. We do however remember how many columns we thought the type had\n * (including dropped columns!), so that we can successfully ignore any\n * columns added after the query was parsed.\n *\n * The query jumbling only needs to track the function expression.\n */\n" @@ -1909,7 +1959,9 @@ "comment": "\t/* can eqop be implemented by hashing? */\n" }, { - "comment": "" + "name": "hashable", + "c_type": "bool", + "comment": null } ], "comment": "/*\n * SortGroupClause -\n *\t\trepresentation of ORDER BY, GROUP BY, PARTITION BY,\n *\t\tDISTINCT, DISTINCT ON items\n *\n * You might think that ORDER BY is only interested in defining ordering,\n * and GROUP/DISTINCT are only interested in defining equality. However,\n * one way to implement grouping is to sort and then apply a \"uniq\"-like\n * filter. So it's also interesting to keep track of possible sort operators\n * for GROUP/DISTINCT, and in particular to try to sort for the grouping\n * in a way that will also yield a requested ORDER BY ordering. So we need\n * to be able to compare ORDER BY and GROUP/DISTINCT lists, which motivates\n * the decision to give them the same representation.\n *\n * tleSortGroupRef must match ressortgroupref of exactly one entry of the\n *\t\tquery's targetlist; that is the expression to be sorted or grouped by.\n * eqop is the OID of the equality operator.\n * sortop is the OID of the ordering operator (a \"<\" or \">\" operator),\n *\t\tor InvalidOid if not available.\n * nulls_first means about what you'd expect. If sortop is InvalidOid\n *\t\tthen nulls_first is meaningless and should be set to false.\n * hashable is true if eqop is hashable (note this condition also depends\n *\t\ton the datatype of the input expression).\n *\n * In an ORDER BY item, all fields must be valid. (The eqop isn't essential\n * here, but it's cheap to get it along with the sortop, and requiring it\n * to be valid eases comparisons to grouping items.) Note that this isn't\n * actually enough information to determine an ordering: if the sortop is\n * collation-sensitive, a collation OID is needed too. We don't store the\n * collation in SortGroupClause because it's not available at the time the\n * parser builds the SortGroupClause; instead, consult the exposed collation\n * of the referenced targetlist expression to find out what it is.\n *\n * In a grouping item, eqop must be valid. If the eqop is a btree equality\n * operator, then sortop should be set to a compatible ordering operator.\n * We prefer to set eqop/sortop/nulls_first to match any ORDER BY item that\n * the query presents for the same tlist item. If there is none, we just\n * use the default ordering op for the datatype.\n *\n * If the tlist item's type has a hash opclass but no btree opclass, then\n * we will set eqop to the hash equality operator, sortop to InvalidOid,\n * and nulls_first to false. A grouping item of this kind can only be\n * implemented by hashing, and of course it'll never match an ORDER BY item.\n *\n * The hashable flag is provided since we generally have the requisite\n * information readily available when the SortGroupClause is constructed,\n * and it's relatively expensive to get it again later. Note there is no\n * need for a \"sortable\" flag since OidIsValid(sortop) serves the purpose.\n *\n * A query might have both ORDER BY and DISTINCT (or DISTINCT ON) clauses.\n * In SELECT DISTINCT, the distinctClause list is as long or longer than the\n * sortClause list, while in SELECT DISTINCT ON it's typically shorter.\n * The two lists must match up to the end of the shorter one --- the parser\n * rearranges the distinctClause if necessary to make this true. (This\n * restriction ensures that only one sort step is needed to both satisfy the\n * ORDER BY and set up for the Unique step. This is semantically necessary\n * for DISTINCT ON, and presents no real drawback for DISTINCT.)\n */\n" @@ -1922,7 +1974,9 @@ "comment": null }, { - "comment": "" + "name": "kind", + "c_type": "GroupingSetKind", + "comment": null }, { "name": "content", @@ -1948,13 +2002,17 @@ "comment": "\t/* window name (NULL in an OVER clause) */\n" }, { - "comment": "" + "name": "name", + "c_type": "char*", + "comment": null }, { "comment": "\t/* referenced window name, if any */\n" }, { - "comment": "" + "name": "refname", + "c_type": "char*", + "comment": null }, { "name": "partitionClause", @@ -1988,37 +2046,49 @@ "comment": "\t/* qual to help short-circuit execution */\n" }, { - "comment": "" + "name": "runCondition", + "c_type": "List*", + "comment": null }, { "comment": "\t/* in_range function for startOffset */\n" }, { - "comment": "" + "name": "startInRangeFunc", + "c_type": "Oid", + "comment": null }, { "comment": "\t/* in_range function for endOffset */\n" }, { - "comment": "" + "name": "endInRangeFunc", + "c_type": "Oid", + "comment": null }, { "comment": "\t/* collation for in_range tests */\n" }, { - "comment": "" + "name": "inRangeColl", + "c_type": "Oid", + "comment": null }, { "comment": "\t/* use ASC sort order for in_range tests? */\n" }, { - "comment": "" + "name": "inRangeAsc", + "c_type": "bool", + "comment": null }, { "comment": "\t/* nulls sort first for in_range tests? */\n" }, { - "comment": "" + "name": "inRangeNullsFirst", + "c_type": "bool", + "comment": null }, { "name": "winref", @@ -2029,7 +2099,9 @@ "comment": "\t/* did we copy orderClause from refname? */\n" }, { - "comment": "" + "name": "copiedOrder", + "c_type": "bool", + "comment": null } ], "comment": "/*\n * WindowClause -\n *\t\ttransformed representation of WINDOW and OVER clauses\n *\n * A parsed Query's windowClause list contains these structs. \"name\" is set\n * if the clause originally came from WINDOW, and is NULL if it originally\n * was an OVER clause (but note that we collapse out duplicate OVERs).\n * partitionClause and orderClause are lists of SortGroupClause structs.\n * If we have RANGE with offset PRECEDING/FOLLOWING, the semantics of that are\n * specified by startInRangeFunc/inRangeColl/inRangeAsc/inRangeNullsFirst\n * for the start offset, or endInRangeFunc/inRange* for the end offset.\n * winref is an ID number referenced by WindowFunc nodes; it must be unique\n * among the members of a Query's windowClause list.\n * When refname isn't null, the partitionClause is always copied from there;\n * the orderClause might or might not be copied (see copiedOrder); the framing\n * options are never copied, per spec.\n *\n * The information relevant for the query jumbling is the partition clause\n * type and its bounds.\n */\n" @@ -2269,7 +2341,9 @@ "comment": "\t/* optional list of column names */\n" }, { - "comment": "" + "name": "aliascolnames", + "c_type": "List*", + "comment": null }, { "name": "ctematerialized", @@ -2285,10 +2359,14 @@ "comment": "/* the CTE's subquery */" }, { - "comment": "" + "name": "search_clause", + "c_type": "CTESearchClause*", + "comment": null }, { - "comment": "" + "name": "cycle_clause", + "c_type": "CTECycleClause*", + "comment": null }, { "name": "location", @@ -2302,7 +2380,9 @@ "comment": "\t/* is this CTE actually recursive? */\n" }, { - "comment": "" + "name": "cterecursive", + "c_type": "bool", + "comment": null }, { "comment": "" @@ -2311,31 +2391,41 @@ "comment": "\t/*\n\t * Number of RTEs referencing this CTE (excluding internal\n\t * self-references), irrelevant for query jumbling.\n\t */\n" }, { - "comment": "" + "name": "cterefcount", + "c_type": "int", + "comment": null }, { "comment": "\t/* list of output column names */\n" }, { - "comment": "" + "name": "ctecolnames", + "c_type": "List*", + "comment": null }, { "comment": "\t/* OID list of output column type OIDs */\n" }, { - "comment": "" + "name": "ctecoltypes", + "c_type": "List*", + "comment": null }, { "comment": "\t/* integer list of output column typmods */\n" }, { - "comment": "" + "name": "ctecoltypmods", + "c_type": "List*", + "comment": null }, { "comment": "\t/* OID list of column collation OIDs */\n" }, { - "comment": "" + "name": "ctecolcollations", + "c_type": "List*", + "comment": null } ], "comment": null @@ -2404,7 +2494,9 @@ "comment": "\t/* OVERRIDING clause */\n" }, { - "comment": "" + "name": "override", + "c_type": "OverridingKind", + "comment": null }, { "name": "qual", @@ -2420,7 +2512,9 @@ "comment": "\t/* target attribute numbers of an UPDATE */\n" }, { - "comment": "" + "name": "updateColnos", + "c_type": "List*", + "comment": null } ], "comment": "/*\n * MergeAction -\n *\t\tTransformed representation of a WHEN clause in a MERGE statement\n */\n" @@ -3037,25 +3131,33 @@ "comment": "\t/* OID list of output column type OIDs */\n" }, { - "comment": "" + "name": "colTypes", + "c_type": "List*", + "comment": null }, { "comment": "\t/* integer list of output column typmods */\n" }, { - "comment": "" + "name": "colTypmods", + "c_type": "List*", + "comment": null }, { "comment": "\t/* OID list of output column collation OIDs */\n" }, { - "comment": "" + "name": "colCollations", + "c_type": "List*", + "comment": null }, { "comment": "\t/* a list of SortGroupClause's */\n" }, { - "comment": "" + "name": "groupClauses", + "c_type": "List*", + "comment": null }, { "comment": "\t/* groupClauses is NIL if UNION ALL, but must be set otherwise */\n" @@ -5513,13 +5615,17 @@ "comment": "\t/* transformed call, with only input args */\n" }, { - "comment": "" + "name": "funcexpr", + "c_type": "FuncExpr*", + "comment": null }, { "comment": "\t/* transformed output-argument expressions */\n" }, { - "comment": "" + "name": "outargs", + "c_type": "List*", + "comment": null } ], "comment": "/* ----------------------\n *\t\tCALL statement\n *\n * OUT-mode arguments are removed from the transformed funcexpr. The outargs\n * list contains copies of the expressions for all output arguments, in the\n * order of the procedure's declared arguments. (outargs is never evaluated,\n * but is useful to the caller as a reference for what to assign to.)\n * The transformed call state is not relevant in the query jumbling, only the\n * function call is.\n * ----------------------\n */\n" @@ -7005,13 +7111,17 @@ "comment": "\t/* list of namespace URI expressions */\n" }, { - "comment": "" + "name": "ns_uris", + "c_type": "List*", + "comment": null }, { "comment": "\t/* list of namespace names or NULL */\n" }, { - "comment": "" + "name": "ns_names", + "c_type": "List*", + "comment": null }, { "comment": "\t/* input document expression */\n" @@ -7033,25 +7143,33 @@ "comment": "\t/* column names (list of String) */\n" }, { - "comment": "" + "name": "colnames", + "c_type": "List*", + "comment": null }, { "comment": "\t/* OID list of column type OIDs */\n" }, { - "comment": "" + "name": "coltypes", + "c_type": "List*", + "comment": null }, { "comment": "\t/* integer list of column typmods */\n" }, { - "comment": "" + "name": "coltypmods", + "c_type": "List*", + "comment": null }, { "comment": "\t/* OID list of column collation OIDs */\n" }, { - "comment": "" + "name": "colcollations", + "c_type": "List*", + "comment": null }, { "comment": "\t/* list of column filter expressions */\n" @@ -7065,19 +7183,25 @@ "comment": "\t/* list of column default expressions */\n" }, { - "comment": "" + "name": "coldefexprs", + "c_type": "List*", + "comment": null }, { "comment": "\t/* nullability flag for each output column */\n" }, { - "comment": "" + "name": "notnulls", + "c_type": "Bitmapset*", + "comment": null }, { "comment": "\t/* counts from 0; -1 if none specified */\n" }, { - "comment": "" + "name": "ordinalitycol", + "c_type": "int", + "comment": null }, { "comment": "\t/* token location, or -1 if unknown */\n" @@ -7134,7 +7258,9 @@ "comment": "\t/* materialized view's SELECT query */\n" }, { - "comment": "" + "name": "viewQuery", + "c_type": "Node*", + "comment": null }, { "name": "skipData", @@ -7190,19 +7316,25 @@ "comment": "\t/* pg_type OID for the type of this var */\n" }, { - "comment": "" + "name": "vartype", + "c_type": "Oid", + "comment": null }, { "comment": "\t/* pg_attribute typmod value */\n" }, { - "comment": "" + "name": "vartypmod", + "c_type": "int32", + "comment": null }, { "comment": "\t/* OID of collation, or InvalidOid if none */\n" }, { - "comment": "" + "name": "varcollid", + "c_type": "Oid", + "comment": null }, { "comment": "" @@ -7211,7 +7343,9 @@ "comment": "\t/*\n\t * RT indexes of outer joins that can replace the Var's value with null.\n\t * We can omit varnullingrels in the query jumble, because it's fully\n\t * determined by varno/varlevelsup plus the Var's query location.\n\t */\n" }, { - "comment": "" + "name": "varnullingrels", + "c_type": "Bitmapset*", + "comment": null }, { "comment": "" @@ -7275,31 +7409,41 @@ "comment": "\t/* typmod value, if any */\n" }, { - "comment": "" + "name": "consttypmod", + "c_type": "int32", + "comment": null }, { "comment": "\t/* OID of collation, or InvalidOid if none */\n" }, { - "comment": "" + "name": "constcollid", + "c_type": "Oid", + "comment": null }, { "comment": "\t/* typlen of the constant's datatype */\n" }, { - "comment": "" + "name": "constlen", + "c_type": "int", + "comment": null }, { "comment": "\t/* the constant's value */\n" }, { - "comment": "" + "name": "constvalue", + "c_type": "Datum", + "comment": null }, { "comment": "\t/* whether the constant is null (if true, constvalue is undefined) */\n" }, { - "comment": "" + "name": "constisnull", + "c_type": "bool", + "comment": null }, { "comment": "" @@ -7308,7 +7452,9 @@ "comment": "\t/*\n\t * Whether this datatype is passed by value. If true, then all the\n\t * information is stored in the Datum. If false, then the Datum contains\n\t * a pointer to the information.\n\t */\n" }, { - "comment": "" + "name": "constbyval", + "c_type": "bool", + "comment": null }, { "comment": "" @@ -7317,7 +7463,9 @@ "comment": "\t/*\n\t * token location, or -1 if unknown. All constants are tracked as\n\t * locations in query jumbling, to be marked as parameters.\n\t */\n" }, { - "comment": "" + "name": "location", + "c_type": "int", + "comment": null } ], "comment": "/*\n * Const\n *\n * Note: for varlena data types, we make a rule that a Const node's value\n * must be in non-extended form (4-byte header, no compression or external\n * references). This ensures that the Const node is self-contained and makes\n * it more likely that equal() will see logically identical values as equal.\n *\n * Only the constant type OID is relevant for the query jumbling.\n */\n" @@ -7348,13 +7496,17 @@ "comment": "\t/* typmod value, if known */\n" }, { - "comment": "" + "name": "paramtypmod", + "c_type": "int32", + "comment": null }, { "comment": "\t/* OID of collation, or InvalidOid if none */\n" }, { - "comment": "" + "name": "paramcollid", + "c_type": "Oid", + "comment": null }, { "comment": "\t/* token location, or -1 if unknown */\n" @@ -7392,7 +7544,9 @@ "comment": "\t/* type Oid of result of the aggregate */\n" }, { - "comment": "" + "name": "aggtype", + "c_type": "Oid", + "comment": null }, { "comment": "" @@ -7401,7 +7555,9 @@ "comment": "\t/* OID of collation of result */\n" }, { - "comment": "" + "name": "aggcollid", + "c_type": "Oid", + "comment": null }, { "comment": "" @@ -7410,7 +7566,9 @@ "comment": "\t/* OID of collation that function should use */\n" }, { - "comment": "" + "name": "inputcollid", + "c_type": "Oid", + "comment": null }, { "comment": "" @@ -7428,7 +7586,9 @@ "comment": "\t/* type Oids of direct and aggregated args */\n" }, { - "comment": "" + "name": "aggargtypes", + "c_type": "List*", + "comment": null }, { "comment": "" @@ -7492,7 +7652,9 @@ "comment": "\t/* true if argument list was really '*' */\n" }, { - "comment": "" + "name": "aggstar", + "c_type": "bool", + "comment": null }, { "comment": "" @@ -7501,7 +7663,9 @@ "comment": "\t/*\n\t * true if variadic arguments have been combined into an array last\n\t * argument\n\t */\n" }, { - "comment": "" + "name": "aggvariadic", + "c_type": "bool", + "comment": null }, { "comment": "" @@ -7510,7 +7674,9 @@ "comment": "\t/* aggregate kind (see pg_aggregate.h) */\n" }, { - "comment": "" + "name": "aggkind", + "c_type": "char", + "comment": null }, { "comment": "" @@ -7528,7 +7694,9 @@ "comment": "\t/* > 0 if agg belongs to outer query */\n" }, { - "comment": "" + "name": "agglevelsup", + "c_type": "Index", + "comment": null }, { "comment": "" @@ -7537,7 +7705,9 @@ "comment": "\t/* expected agg-splitting mode of parent Agg */\n" }, { - "comment": "" + "name": "aggsplit", + "c_type": "AggSplit", + "comment": null }, { "comment": "" @@ -7546,7 +7716,9 @@ "comment": "\t/* unique ID within the Agg node */\n" }, { - "comment": "" + "name": "aggno", + "c_type": "int", + "comment": null }, { "comment": "" @@ -7555,7 +7727,9 @@ "comment": "\t/* unique ID of transition state in the Agg */\n" }, { - "comment": "" + "name": "aggtransno", + "c_type": "int", + "comment": null }, { "comment": "" @@ -7585,7 +7759,9 @@ "comment": "\t/* arguments, not evaluated but kept for benefit of EXPLAIN etc. */\n" }, { - "comment": "" + "name": "args", + "c_type": "List*", + "comment": null }, { "comment": "" @@ -7594,7 +7770,9 @@ "comment": "\t/* ressortgrouprefs of arguments */\n" }, { - "comment": "" + "name": "refs", + "c_type": "List*", + "comment": null }, { "comment": "" @@ -7649,19 +7827,25 @@ "comment": "\t/* type Oid of result of the window function */\n" }, { - "comment": "" + "name": "wintype", + "c_type": "Oid", + "comment": null }, { "comment": "\t/* OID of collation of result */\n" }, { - "comment": "" + "name": "wincollid", + "c_type": "Oid", + "comment": null }, { "comment": "\t/* OID of collation that function should use */\n" }, { - "comment": "" + "name": "inputcollid", + "c_type": "Oid", + "comment": null }, { "comment": "\t/* arguments to the window function */\n" @@ -7691,13 +7875,17 @@ "comment": "\t/* true if argument list was really '*' */\n" }, { - "comment": "" + "name": "winstar", + "c_type": "bool", + "comment": null }, { "comment": "\t/* is function a simple aggregate? */\n" }, { - "comment": "" + "name": "winagg", + "c_type": "bool", + "comment": null }, { "comment": "\t/* token location, or -1 if unknown */\n" @@ -7721,31 +7909,41 @@ "comment": "\t/* type of the container proper */\n" }, { - "comment": "" + "name": "refcontainertype", + "c_type": "Oid", + "comment": null }, { "comment": "\t/* the container type's pg_type.typelem */\n" }, { - "comment": "" + "name": "refelemtype", + "c_type": "Oid", + "comment": null }, { "comment": "\t/* type of the SubscriptingRef's result */\n" }, { - "comment": "" + "name": "refrestype", + "c_type": "Oid", + "comment": null }, { "comment": "\t/* typmod of the result */\n" }, { - "comment": "" + "name": "reftypmod", + "c_type": "int32", + "comment": null }, { "comment": "\t/* collation of result, or InvalidOid if none */\n" }, { - "comment": "" + "name": "refcollid", + "c_type": "Oid", + "comment": null }, { "comment": "\t/* expressions that evaluate to upper container indexes */\n" @@ -7804,13 +8002,17 @@ "comment": "\t/* PG_TYPE OID of result value */\n" }, { - "comment": "" + "name": "funcresulttype", + "c_type": "Oid", + "comment": null }, { "comment": "\t/* true if function returns set */\n" }, { - "comment": "" + "name": "funcretset", + "c_type": "bool", + "comment": null }, { "comment": "" @@ -7819,25 +8021,33 @@ "comment": "\t/*\n\t * true if variadic arguments have been combined into an array last\n\t * argument\n\t */\n" }, { - "comment": "" + "name": "funcvariadic", + "c_type": "bool", + "comment": null }, { "comment": "\t/* how to display this function call */\n" }, { - "comment": "" + "name": "funcformat", + "c_type": "CoercionForm", + "comment": null }, { "comment": "\t/* OID of collation of result */\n" }, { - "comment": "" + "name": "funccollid", + "c_type": "Oid", + "comment": null }, { "comment": "\t/* OID of collation that function should use */\n" }, { - "comment": "" + "name": "inputcollid", + "c_type": "Oid", + "comment": null }, { "comment": "\t/* arguments to the function */\n" @@ -7877,7 +8087,9 @@ "comment": "\t/* the name */\n" }, { - "comment": "" + "name": "name", + "c_type": "char*", + "comment": null }, { "comment": "\t/* argument's number in positional notation */\n" @@ -7932,7 +8144,9 @@ "comment": "\t/* PG_TYPE OID of result value */\n" }, { - "comment": "" + "name": "opresulttype", + "c_type": "Oid", + "comment": null }, { "comment": "" @@ -7941,7 +8155,9 @@ "comment": "\t/* true if operator returns set */\n" }, { - "comment": "" + "name": "opretset", + "c_type": "bool", + "comment": null }, { "comment": "" @@ -7950,7 +8166,9 @@ "comment": "\t/* OID of collation of result */\n" }, { - "comment": "" + "name": "opcollid", + "c_type": "Oid", + "comment": null }, { "comment": "" @@ -7959,7 +8177,9 @@ "comment": "\t/* OID of collation that operator should use */\n" }, { - "comment": "" + "name": "inputcollid", + "c_type": "Oid", + "comment": null }, { "comment": "" @@ -8049,7 +8269,9 @@ "comment": "\t/* OID of collation that operator should use */\n" }, { - "comment": "" + "name": "inputcollid", + "c_type": "Oid", + "comment": null }, { "comment": "" @@ -8127,7 +8349,9 @@ "comment": "\t/* originally specified operator name */\n" }, { - "comment": "" + "name": "operName", + "c_type": "List*", + "comment": null }, { "comment": "\t/* subselect as Query* or raw parsetree */\n" @@ -8301,19 +8525,25 @@ "comment": "\t/* type of the field (result type of this node) */\n" }, { - "comment": "" + "name": "resulttype", + "c_type": "Oid", + "comment": null }, { "comment": "\t/* output typmod (usually -1) */\n" }, { - "comment": "" + "name": "resulttypmod", + "c_type": "int32", + "comment": null }, { "comment": "\t/* OID of collation of the field */\n" }, { - "comment": "" + "name": "resultcollid", + "c_type": "Oid", + "comment": null } ], "comment": "/* ----------------\n * FieldSelect\n *\n * FieldSelect represents the operation of extracting one field from a tuple\n * value. At runtime, the input expression is expected to yield a rowtype\n * Datum. The specified field number is extracted and returned as a Datum.\n * ----------------\n */\n" @@ -8339,13 +8569,17 @@ "comment": "\t/* integer list of field attnums */\n" }, { - "comment": "" + "name": "fieldnums", + "c_type": "List*", + "comment": null }, { "comment": "\t/* type of result (same as type of arg) */\n" }, { - "comment": "" + "name": "resulttype", + "c_type": "Oid", + "comment": null }, { "comment": "\t/* Like RowExpr, we deliberately omit a typmod and collation here */\n" @@ -8374,19 +8608,25 @@ "comment": "\t/* output typmod (usually -1) */\n" }, { - "comment": "" + "name": "resulttypmod", + "c_type": "int32", + "comment": null }, { "comment": "\t/* OID of collation, or InvalidOid if none */\n" }, { - "comment": "" + "name": "resultcollid", + "c_type": "Oid", + "comment": null }, { "comment": "\t/* how to display this node */\n" }, { - "comment": "" + "name": "relabelformat", + "c_type": "CoercionForm", + "comment": null }, { "name": "location", @@ -8420,13 +8660,17 @@ "comment": "\t/* OID of collation, or InvalidOid if none */\n" }, { - "comment": "" + "name": "resultcollid", + "c_type": "Oid", + "comment": null }, { "comment": "\t/* how to display this node */\n" }, { - "comment": "" + "name": "coerceformat", + "c_type": "CoercionForm", + "comment": null }, { "name": "location", @@ -8462,19 +8706,25 @@ "comment": "\t/* output typmod (also element typmod) */\n" }, { - "comment": "" + "name": "resulttypmod", + "c_type": "int32", + "comment": null }, { "comment": "\t/* OID of collation, or InvalidOid if none */\n" }, { - "comment": "" + "name": "resultcollid", + "c_type": "Oid", + "comment": null }, { "comment": "\t/* how to display this node */\n" }, { - "comment": "" + "name": "coerceformat", + "c_type": "CoercionForm", + "comment": null }, { "name": "location", @@ -8508,7 +8758,9 @@ "comment": "\t/* how to display this node */\n" }, { - "comment": "" + "name": "convertformat", + "c_type": "CoercionForm", + "comment": null }, { "name": "location", @@ -8554,13 +8806,17 @@ "comment": "\t/* type of expression result */\n" }, { - "comment": "" + "name": "casetype", + "c_type": "Oid", + "comment": null }, { "comment": "\t/* OID of collation, or InvalidOid if none */\n" }, { - "comment": "" + "name": "casecollid", + "c_type": "Oid", + "comment": null }, { "name": "arg", @@ -8626,13 +8882,17 @@ "comment": "\t/* typemod for substituted value */\n" }, { - "comment": "" + "name": "typeMod", + "c_type": "int32", + "comment": null }, { "comment": "\t/* collation for the substituted value */\n" }, { - "comment": "" + "name": "collation", + "c_type": "Oid", + "comment": null } ], "comment": "/*\n * Placeholder node for the test value to be processed by a CASE expression.\n * This is effectively like a Param, but can be implemented more simply\n * since we need only one replacement value at a time.\n *\n * We also abuse this node type for some other purposes, including:\n *\t* Placeholder for the current array element value in ArrayCoerceExpr;\n *\t see build_coercion_expression().\n *\t* Nested FieldStore/SubscriptingRef assignment expressions in INSERT/UPDATE;\n *\t see transformAssignmentIndirection().\n *\t* Placeholder for intermediate results in some SQL/JSON expression nodes,\n *\t such as JsonConstructorExpr.\n *\n * The uses in CaseExpr and ArrayCoerceExpr are safe only to the extent that\n * there is not any other CaseExpr or ArrayCoerceExpr between the value source\n * node and its child CaseTestExpr(s). This is true in the parse analysis\n * output, but the planner's function-inlining logic has to be careful not to\n * break it.\n *\n * The nested-assignment-expression case is safe because the only node types\n * that can be above such CaseTestExprs are FieldStore and SubscriptingRef.\n */\n" @@ -8648,19 +8908,25 @@ "comment": "\t/* type of expression result */\n" }, { - "comment": "" + "name": "array_typeid", + "c_type": "Oid", + "comment": null }, { "comment": "\t/* OID of collation, or InvalidOid if none */\n" }, { - "comment": "" + "name": "array_collid", + "c_type": "Oid", + "comment": null }, { "comment": "\t/* common type of array elements */\n" }, { - "comment": "" + "name": "element_typeid", + "c_type": "Oid", + "comment": null }, { "comment": "\t/* the array elements or sub-arrays */\n" @@ -8674,7 +8940,9 @@ "comment": "\t/* true if elements are sub-arrays */\n" }, { - "comment": "" + "name": "multidims", + "c_type": "bool", + "comment": null }, { "comment": "\t/* token location, or -1 if unknown */\n" @@ -8706,7 +8974,9 @@ "comment": "\t/* RECORDOID or a composite type's ID */\n" }, { - "comment": "" + "name": "row_typeid", + "c_type": "Oid", + "comment": null }, { "comment": "" @@ -8721,7 +8991,9 @@ "comment": "\t/* how to display this node */\n" }, { - "comment": "" + "name": "row_format", + "c_type": "CoercionForm", + "comment": null }, { "comment": "" @@ -8730,7 +9002,9 @@ "comment": "\t/* list of String, or NIL */\n" }, { - "comment": "" + "name": "colnames", + "c_type": "List*", + "comment": null }, { "comment": "" @@ -8765,19 +9039,25 @@ "comment": "\t/* OID list of pairwise comparison ops */\n" }, { - "comment": "" + "name": "opnos", + "c_type": "List*", + "comment": null }, { "comment": "\t/* OID list of containing operator families */\n" }, { - "comment": "" + "name": "opfamilies", + "c_type": "List*", + "comment": null }, { "comment": "\t/* OID list of collations for comparisons */\n" }, { - "comment": "" + "name": "inputcollids", + "c_type": "List*", + "comment": null }, { "comment": "\t/* the left-hand input arguments */\n" @@ -8809,13 +9089,17 @@ "comment": "\t/* type of expression result */\n" }, { - "comment": "" + "name": "coalescetype", + "c_type": "Oid", + "comment": null }, { "comment": "\t/* OID of collation, or InvalidOid if none */\n" }, { - "comment": "" + "name": "coalescecollid", + "c_type": "Oid", + "comment": null }, { "comment": "\t/* the arguments */\n" @@ -8847,19 +9131,25 @@ "comment": "\t/* common type of arguments and result */\n" }, { - "comment": "" + "name": "minmaxtype", + "c_type": "Oid", + "comment": null }, { "comment": "\t/* OID of collation of result */\n" }, { - "comment": "" + "name": "minmaxcollid", + "c_type": "Oid", + "comment": null }, { "comment": "\t/* OID of collation that function should use */\n" }, { - "comment": "" + "name": "inputcollid", + "c_type": "Oid", + "comment": null }, { "comment": "\t/* function to execute */\n" @@ -8907,7 +9197,9 @@ "comment": "\t/*\n\t * Result type/typmod. Type is fully determined by \"op\", so no need to\n\t * include this Oid in the query jumbling.\n\t */\n" }, { - "comment": "" + "name": "type", + "c_type": "Oid", + "comment": null }, { "name": "typmod", @@ -8941,7 +9233,9 @@ "comment": "\t/* name in xml(NAME foo ...) syntaxes */\n" }, { - "comment": "" + "name": "name", + "c_type": "char*", + "comment": null }, { "comment": "\t/* non-XML expressions for xml_attributes */\n" @@ -8955,7 +9249,9 @@ "comment": "\t/* parallel list of String values */\n" }, { - "comment": "" + "name": "arg_names", + "c_type": "List*", + "comment": null }, { "comment": "\t/* list of expressions */\n" @@ -8969,7 +9265,9 @@ "comment": "\t/* DOCUMENT or CONTENT */\n" }, { - "comment": "" + "name": "xmloption", + "c_type": "XmlOptionType", + "comment": null }, { "comment": "\t/* INDENT option for XMLSERIALIZE */\n" @@ -8983,10 +9281,14 @@ "comment": "\t/* target type/typmod for XMLSERIALIZE */\n" }, { - "comment": "" + "name": "type", + "c_type": "Oid", + "comment": null }, { - "comment": "" + "name": "typmod", + "c_type": "int32", + "comment": null }, { "comment": "\t/* token location, or -1 if unknown */\n" @@ -9180,7 +9482,9 @@ "comment": "\t/* T to perform field-by-field null checks */\n" }, { - "comment": "" + "name": "argisrow", + "c_type": "bool", + "comment": null }, { "name": "location", @@ -9236,19 +9540,25 @@ "comment": "\t/* output typmod (currently always -1) */\n" }, { - "comment": "" + "name": "resulttypmod", + "c_type": "int32", + "comment": null }, { "comment": "\t/* OID of collation, or InvalidOid if none */\n" }, { - "comment": "" + "name": "resultcollid", + "c_type": "Oid", + "comment": null }, { "comment": "\t/* how to display this node */\n" }, { - "comment": "" + "name": "coercionformat", + "c_type": "CoercionForm", + "comment": null }, { "name": "location", @@ -9277,13 +9587,17 @@ "comment": "\t/* typemod for substituted value */\n" }, { - "comment": "" + "name": "typeMod", + "c_type": "int32", + "comment": null }, { "comment": "\t/* collation for the substituted value */\n" }, { - "comment": "" + "name": "collation", + "c_type": "Oid", + "comment": null }, { "comment": "\t/* token location, or -1 if unknown */\n" @@ -9315,13 +9629,17 @@ "comment": "\t/* typemod for substituted value */\n" }, { - "comment": "" + "name": "typeMod", + "c_type": "int32", + "comment": null }, { "comment": "\t/* collation for the substituted value */\n" }, { - "comment": "" + "name": "collation", + "c_type": "Oid", + "comment": null }, { "comment": "\t/* token location, or -1 if unknown */\n" @@ -9431,7 +9749,9 @@ "comment": "\t/* name of the column (could be NULL) */\n" }, { - "comment": "" + "name": "resname", + "c_type": "char*", + "comment": null }, { "comment": "\t/* nonzero if referenced by a sort/group clause */\n" @@ -9445,19 +9765,25 @@ "comment": "\t/* OID of column's source table */\n" }, { - "comment": "" + "name": "resorigtbl", + "c_type": "Oid", + "comment": null }, { "comment": "\t/* column's number in source table */\n" }, { - "comment": "" + "name": "resorigcol", + "c_type": "AttrNumber", + "comment": null }, { "comment": "\t/* set to true to eliminate the attribute from final target list */\n" }, { - "comment": "" + "name": "resjunk", + "c_type": "bool", + "comment": null } ], "comment": "/*--------------------\n * TargetEntry -\n *\t a target entry (used in query target lists)\n *\n * Strictly speaking, a TargetEntry isn't an expression node (since it can't\n * be evaluated by ExecEvalExpr). But we treat it as one anyway, since in\n * very many places it's convenient to process a whole query targetlist as a\n * single expression tree.\n *\n * In a SELECT's targetlist, resno should always be equal to the item's\n * ordinal position (counting from 1). However, in an INSERT or UPDATE\n * targetlist, resno represents the attribute number of the destination\n * column for the item; so there may be missing or out-of-order resnos.\n * It is even legal to have duplicated resnos; consider\n *\t\tUPDATE table SET arraycol[1] = ..., arraycol[2] = ..., ...\n * In an INSERT, the rewriter and planner will normalize the tlist by\n * reordering it into physical column order and filling in default values\n * for any columns not assigned values by the original query. In an UPDATE,\n * after the rewriter merges multiple assignments for the same column, the\n * planner extracts the target-column numbers into a separate \"update_colnos\"\n * list, and then renumbers the tlist elements serially. Thus, tlist resnos\n * match ordinal position in all tlists seen by the executor; but it is wrong\n * to assume that before planning has happened.\n *\n * resname is required to represent the correct column name in non-resjunk\n * entries of top-level SELECT targetlists, since it will be used as the\n * column title sent to the frontend. In most other contexts it is only\n * a debugging aid, and may be wrong or even NULL. (In particular, it may\n * be wrong in a tlist from a stored rule, if the referenced column has been\n * renamed by ALTER TABLE since the rule was made. Also, the planner tends\n * to store NULL rather than look up a valid name for tlist entries in\n * non-toplevel plan nodes.) In resjunk entries, resname should be either\n * a specific system-generated name (such as \"ctid\") or NULL; anything else\n * risks confusing ExecGetJunkAttribute!\n *\n * ressortgroupref is used in the representation of ORDER BY, GROUP BY, and\n * DISTINCT items. Targetlist entries with ressortgroupref=0 are not\n * sort/group items. If ressortgroupref>0, then this item is an ORDER BY,\n * GROUP BY, and/or DISTINCT target value. No two entries in a targetlist\n * may have the same nonzero ressortgroupref --- but there is no particular\n * meaning to the nonzero values, except as tags. (For example, one must\n * not assume that lower ressortgroupref means a more significant sort key.)\n * The order of the associated SortGroupClause lists determine the semantics.\n *\n * resorigtbl/resorigcol identify the source of the column, if it is a\n * simple reference to a column of a base table (or view). If it is not\n * a simple reference, these fields are zeroes.\n *\n * If resjunk is true then the column is a working column (such as a sort key)\n * that should be removed from the final output of the query. Resjunk columns\n * must have resnos that cannot duplicate any regular column's resno. Also\n * note that there are places that assume resjunk columns come after non-junk\n * columns.\n *--------------------\n */\n" @@ -9508,13 +9834,17 @@ "comment": "\t/* USING clause, if any (list of String) */\n" }, { - "comment": "" + "name": "usingClause", + "c_type": "List*", + "comment": null }, { "comment": "\t/* alias attached to USING clause, if any */\n" }, { - "comment": "" + "name": "join_using_alias", + "c_type": "Alias*", + "comment": null }, { "comment": "\t/* qualifiers on join, if any */\n" @@ -9528,7 +9858,9 @@ "comment": "\t/* user-written alias clause, if any */\n" }, { - "comment": "" + "name": "alias", + "c_type": "Alias*", + "comment": null }, { "comment": "\t/* RT index assigned for join, or 0 */\n"