// This file is autogenerated by ./scripts/generate_protobuf_and_funcs.rb

static const char*
_enumToStringQuerySource(QuerySource value) {
  switch(value) {
    case QSRC_ORIGINAL: return "QSRC_ORIGINAL";
    case QSRC_PARSER: return "QSRC_PARSER";
    case QSRC_INSTEAD_RULE: return "QSRC_INSTEAD_RULE";
    case QSRC_QUAL_INSTEAD_RULE: return "QSRC_QUAL_INSTEAD_RULE";
    case QSRC_NON_INSTEAD_RULE: return "QSRC_NON_INSTEAD_RULE";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringSortByDir(SortByDir value) {
  switch(value) {
    case SORTBY_DEFAULT: return "SORTBY_DEFAULT";
    case SORTBY_ASC: return "SORTBY_ASC";
    case SORTBY_DESC: return "SORTBY_DESC";
    case SORTBY_USING: return "SORTBY_USING";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringSortByNulls(SortByNulls value) {
  switch(value) {
    case SORTBY_NULLS_DEFAULT: return "SORTBY_NULLS_DEFAULT";
    case SORTBY_NULLS_FIRST: return "SORTBY_NULLS_FIRST";
    case SORTBY_NULLS_LAST: return "SORTBY_NULLS_LAST";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringSetQuantifier(SetQuantifier value) {
  switch(value) {
    case SET_QUANTIFIER_DEFAULT: return "SET_QUANTIFIER_DEFAULT";
    case SET_QUANTIFIER_ALL: return "SET_QUANTIFIER_ALL";
    case SET_QUANTIFIER_DISTINCT: return "SET_QUANTIFIER_DISTINCT";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringA_Expr_Kind(A_Expr_Kind value) {
  switch(value) {
    case AEXPR_OP: return "AEXPR_OP";
    case AEXPR_OP_ANY: return "AEXPR_OP_ANY";
    case AEXPR_OP_ALL: return "AEXPR_OP_ALL";
    case AEXPR_DISTINCT: return "AEXPR_DISTINCT";
    case AEXPR_NOT_DISTINCT: return "AEXPR_NOT_DISTINCT";
    case AEXPR_NULLIF: return "AEXPR_NULLIF";
    case AEXPR_IN: return "AEXPR_IN";
    case AEXPR_LIKE: return "AEXPR_LIKE";
    case AEXPR_ILIKE: return "AEXPR_ILIKE";
    case AEXPR_SIMILAR: return "AEXPR_SIMILAR";
    case AEXPR_BETWEEN: return "AEXPR_BETWEEN";
    case AEXPR_NOT_BETWEEN: return "AEXPR_NOT_BETWEEN";
    case AEXPR_BETWEEN_SYM: return "AEXPR_BETWEEN_SYM";
    case AEXPR_NOT_BETWEEN_SYM: return "AEXPR_NOT_BETWEEN_SYM";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringRoleSpecType(RoleSpecType value) {
  switch(value) {
    case ROLESPEC_CSTRING: return "ROLESPEC_CSTRING";
    case ROLESPEC_CURRENT_ROLE: return "ROLESPEC_CURRENT_ROLE";
    case ROLESPEC_CURRENT_USER: return "ROLESPEC_CURRENT_USER";
    case ROLESPEC_SESSION_USER: return "ROLESPEC_SESSION_USER";
    case ROLESPEC_PUBLIC: return "ROLESPEC_PUBLIC";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringTableLikeOption(TableLikeOption value) {
  switch(value) {
    case CREATE_TABLE_LIKE_COMMENTS: return "CREATE_TABLE_LIKE_COMMENTS";
    case CREATE_TABLE_LIKE_COMPRESSION: return "CREATE_TABLE_LIKE_COMPRESSION";
    case CREATE_TABLE_LIKE_CONSTRAINTS: return "CREATE_TABLE_LIKE_CONSTRAINTS";
    case CREATE_TABLE_LIKE_DEFAULTS: return "CREATE_TABLE_LIKE_DEFAULTS";
    case CREATE_TABLE_LIKE_GENERATED: return "CREATE_TABLE_LIKE_GENERATED";
    case CREATE_TABLE_LIKE_IDENTITY: return "CREATE_TABLE_LIKE_IDENTITY";
    case CREATE_TABLE_LIKE_INDEXES: return "CREATE_TABLE_LIKE_INDEXES";
    case CREATE_TABLE_LIKE_STATISTICS: return "CREATE_TABLE_LIKE_STATISTICS";
    case CREATE_TABLE_LIKE_STORAGE: return "CREATE_TABLE_LIKE_STORAGE";
    case CREATE_TABLE_LIKE_ALL: return "CREATE_TABLE_LIKE_ALL";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringDefElemAction(DefElemAction value) {
  switch(value) {
    case DEFELEM_UNSPEC: return "DEFELEM_UNSPEC";
    case DEFELEM_SET: return "DEFELEM_SET";
    case DEFELEM_ADD: return "DEFELEM_ADD";
    case DEFELEM_DROP: return "DEFELEM_DROP";
  }
  Assert(false);
  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) {
    case PARTITION_RANGE_DATUM_MINVALUE: return "PARTITION_RANGE_DATUM_MINVALUE";
    case PARTITION_RANGE_DATUM_VALUE: return "PARTITION_RANGE_DATUM_VALUE";
    case PARTITION_RANGE_DATUM_MAXVALUE: return "PARTITION_RANGE_DATUM_MAXVALUE";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringRTEKind(RTEKind value) {
  switch(value) {
    case RTE_RELATION: return "RTE_RELATION";
    case RTE_SUBQUERY: return "RTE_SUBQUERY";
    case RTE_JOIN: return "RTE_JOIN";
    case RTE_FUNCTION: return "RTE_FUNCTION";
    case RTE_TABLEFUNC: return "RTE_TABLEFUNC";
    case RTE_VALUES: return "RTE_VALUES";
    case RTE_CTE: return "RTE_CTE";
    case RTE_NAMEDTUPLESTORE: return "RTE_NAMEDTUPLESTORE";
    case RTE_RESULT: return "RTE_RESULT";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringWCOKind(WCOKind value) {
  switch(value) {
    case WCO_VIEW_CHECK: return "WCO_VIEW_CHECK";
    case WCO_RLS_INSERT_CHECK: return "WCO_RLS_INSERT_CHECK";
    case WCO_RLS_UPDATE_CHECK: return "WCO_RLS_UPDATE_CHECK";
    case WCO_RLS_CONFLICT_CHECK: return "WCO_RLS_CONFLICT_CHECK";
    case WCO_RLS_MERGE_UPDATE_CHECK: return "WCO_RLS_MERGE_UPDATE_CHECK";
    case WCO_RLS_MERGE_DELETE_CHECK: return "WCO_RLS_MERGE_DELETE_CHECK";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringGroupingSetKind(GroupingSetKind value) {
  switch(value) {
    case GROUPING_SET_EMPTY: return "GROUPING_SET_EMPTY";
    case GROUPING_SET_SIMPLE: return "GROUPING_SET_SIMPLE";
    case GROUPING_SET_ROLLUP: return "GROUPING_SET_ROLLUP";
    case GROUPING_SET_CUBE: return "GROUPING_SET_CUBE";
    case GROUPING_SET_SETS: return "GROUPING_SET_SETS";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringCTEMaterialize(CTEMaterialize value) {
  switch(value) {
    case CTEMaterializeDefault: return "CTEMaterializeDefault";
    case CTEMaterializeAlways: return "CTEMaterializeAlways";
    case CTEMaterializeNever: return "CTEMaterializeNever";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringJsonQuotes(JsonQuotes value) {
  switch(value) {
    case JS_QUOTES_UNSPEC: return "JS_QUOTES_UNSPEC";
    case JS_QUOTES_KEEP: return "JS_QUOTES_KEEP";
    case JS_QUOTES_OMIT: return "JS_QUOTES_OMIT";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringJsonTableColumnType(JsonTableColumnType value) {
  switch(value) {
    case JTC_FOR_ORDINALITY: return "JTC_FOR_ORDINALITY";
    case JTC_REGULAR: return "JTC_REGULAR";
    case JTC_EXISTS: return "JTC_EXISTS";
    case JTC_FORMATTED: return "JTC_FORMATTED";
    case JTC_NESTED: return "JTC_NESTED";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringSetOperation(SetOperation value) {
  switch(value) {
    case SETOP_NONE: return "SETOP_NONE";
    case SETOP_UNION: return "SETOP_UNION";
    case SETOP_INTERSECT: return "SETOP_INTERSECT";
    case SETOP_EXCEPT: return "SETOP_EXCEPT";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringObjectType(ObjectType value) {
  switch(value) {
    case OBJECT_ACCESS_METHOD: return "OBJECT_ACCESS_METHOD";
    case OBJECT_AGGREGATE: return "OBJECT_AGGREGATE";
    case OBJECT_AMOP: return "OBJECT_AMOP";
    case OBJECT_AMPROC: return "OBJECT_AMPROC";
    case OBJECT_ATTRIBUTE: return "OBJECT_ATTRIBUTE";
    case OBJECT_CAST: return "OBJECT_CAST";
    case OBJECT_COLUMN: return "OBJECT_COLUMN";
    case OBJECT_COLLATION: return "OBJECT_COLLATION";
    case OBJECT_CONVERSION: return "OBJECT_CONVERSION";
    case OBJECT_DATABASE: return "OBJECT_DATABASE";
    case OBJECT_DEFAULT: return "OBJECT_DEFAULT";
    case OBJECT_DEFACL: return "OBJECT_DEFACL";
    case OBJECT_DOMAIN: return "OBJECT_DOMAIN";
    case OBJECT_DOMCONSTRAINT: return "OBJECT_DOMCONSTRAINT";
    case OBJECT_EVENT_TRIGGER: return "OBJECT_EVENT_TRIGGER";
    case OBJECT_EXTENSION: return "OBJECT_EXTENSION";
    case OBJECT_FDW: return "OBJECT_FDW";
    case OBJECT_FOREIGN_SERVER: return "OBJECT_FOREIGN_SERVER";
    case OBJECT_FOREIGN_TABLE: return "OBJECT_FOREIGN_TABLE";
    case OBJECT_FUNCTION: return "OBJECT_FUNCTION";
    case OBJECT_INDEX: return "OBJECT_INDEX";
    case OBJECT_LANGUAGE: return "OBJECT_LANGUAGE";
    case OBJECT_LARGEOBJECT: return "OBJECT_LARGEOBJECT";
    case OBJECT_MATVIEW: return "OBJECT_MATVIEW";
    case OBJECT_OPCLASS: return "OBJECT_OPCLASS";
    case OBJECT_OPERATOR: return "OBJECT_OPERATOR";
    case OBJECT_OPFAMILY: return "OBJECT_OPFAMILY";
    case OBJECT_PARAMETER_ACL: return "OBJECT_PARAMETER_ACL";
    case OBJECT_POLICY: return "OBJECT_POLICY";
    case OBJECT_PROCEDURE: return "OBJECT_PROCEDURE";
    case OBJECT_PUBLICATION: return "OBJECT_PUBLICATION";
    case OBJECT_PUBLICATION_NAMESPACE: return "OBJECT_PUBLICATION_NAMESPACE";
    case OBJECT_PUBLICATION_REL: return "OBJECT_PUBLICATION_REL";
    case OBJECT_ROLE: return "OBJECT_ROLE";
    case OBJECT_ROUTINE: return "OBJECT_ROUTINE";
    case OBJECT_RULE: return "OBJECT_RULE";
    case OBJECT_SCHEMA: return "OBJECT_SCHEMA";
    case OBJECT_SEQUENCE: return "OBJECT_SEQUENCE";
    case OBJECT_SUBSCRIPTION: return "OBJECT_SUBSCRIPTION";
    case OBJECT_STATISTIC_EXT: return "OBJECT_STATISTIC_EXT";
    case OBJECT_TABCONSTRAINT: return "OBJECT_TABCONSTRAINT";
    case OBJECT_TABLE: return "OBJECT_TABLE";
    case OBJECT_TABLESPACE: return "OBJECT_TABLESPACE";
    case OBJECT_TRANSFORM: return "OBJECT_TRANSFORM";
    case OBJECT_TRIGGER: return "OBJECT_TRIGGER";
    case OBJECT_TSCONFIGURATION: return "OBJECT_TSCONFIGURATION";
    case OBJECT_TSDICTIONARY: return "OBJECT_TSDICTIONARY";
    case OBJECT_TSPARSER: return "OBJECT_TSPARSER";
    case OBJECT_TSTEMPLATE: return "OBJECT_TSTEMPLATE";
    case OBJECT_TYPE: return "OBJECT_TYPE";
    case OBJECT_USER_MAPPING: return "OBJECT_USER_MAPPING";
    case OBJECT_VIEW: return "OBJECT_VIEW";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringDropBehavior(DropBehavior value) {
  switch(value) {
    case DROP_RESTRICT: return "DROP_RESTRICT";
    case DROP_CASCADE: return "DROP_CASCADE";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringAlterTableType(AlterTableType value) {
  switch(value) {
    case AT_AddColumn: return "AT_AddColumn";
    case AT_AddColumnToView: return "AT_AddColumnToView";
    case AT_ColumnDefault: return "AT_ColumnDefault";
    case AT_CookedColumnDefault: return "AT_CookedColumnDefault";
    case AT_DropNotNull: return "AT_DropNotNull";
    case AT_SetNotNull: return "AT_SetNotNull";
    case AT_SetExpression: return "AT_SetExpression";
    case AT_DropExpression: return "AT_DropExpression";
    case AT_CheckNotNull: return "AT_CheckNotNull";
    case AT_SetStatistics: return "AT_SetStatistics";
    case AT_SetOptions: return "AT_SetOptions";
    case AT_ResetOptions: return "AT_ResetOptions";
    case AT_SetStorage: return "AT_SetStorage";
    case AT_SetCompression: return "AT_SetCompression";
    case AT_DropColumn: return "AT_DropColumn";
    case AT_AddIndex: return "AT_AddIndex";
    case AT_ReAddIndex: return "AT_ReAddIndex";
    case AT_AddConstraint: return "AT_AddConstraint";
    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_AddIndexConstraint: return "AT_AddIndexConstraint";
    case AT_DropConstraint: return "AT_DropConstraint";
    case AT_ReAddComment: return "AT_ReAddComment";
    case AT_AlterColumnType: return "AT_AlterColumnType";
    case AT_AlterColumnGenericOptions: return "AT_AlterColumnGenericOptions";
    case AT_ChangeOwner: return "AT_ChangeOwner";
    case AT_ClusterOn: return "AT_ClusterOn";
    case AT_DropCluster: return "AT_DropCluster";
    case AT_SetLogged: return "AT_SetLogged";
    case AT_SetUnLogged: return "AT_SetUnLogged";
    case AT_DropOids: return "AT_DropOids";
    case AT_SetAccessMethod: return "AT_SetAccessMethod";
    case AT_SetTableSpace: return "AT_SetTableSpace";
    case AT_SetRelOptions: return "AT_SetRelOptions";
    case AT_ResetRelOptions: return "AT_ResetRelOptions";
    case AT_ReplaceRelOptions: return "AT_ReplaceRelOptions";
    case AT_EnableTrig: return "AT_EnableTrig";
    case AT_EnableAlwaysTrig: return "AT_EnableAlwaysTrig";
    case AT_EnableReplicaTrig: return "AT_EnableReplicaTrig";
    case AT_DisableTrig: return "AT_DisableTrig";
    case AT_EnableTrigAll: return "AT_EnableTrigAll";
    case AT_DisableTrigAll: return "AT_DisableTrigAll";
    case AT_EnableTrigUser: return "AT_EnableTrigUser";
    case AT_DisableTrigUser: return "AT_DisableTrigUser";
    case AT_EnableRule: return "AT_EnableRule";
    case AT_EnableAlwaysRule: return "AT_EnableAlwaysRule";
    case AT_EnableReplicaRule: return "AT_EnableReplicaRule";
    case AT_DisableRule: return "AT_DisableRule";
    case AT_AddInherit: return "AT_AddInherit";
    case AT_DropInherit: return "AT_DropInherit";
    case AT_AddOf: return "AT_AddOf";
    case AT_DropOf: return "AT_DropOf";
    case AT_ReplicaIdentity: return "AT_ReplicaIdentity";
    case AT_EnableRowSecurity: return "AT_EnableRowSecurity";
    case AT_DisableRowSecurity: return "AT_DisableRowSecurity";
    case AT_ForceRowSecurity: return "AT_ForceRowSecurity";
    case AT_NoForceRowSecurity: return "AT_NoForceRowSecurity";
    case AT_GenericOptions: return "AT_GenericOptions";
    case AT_AttachPartition: return "AT_AttachPartition";
    case AT_DetachPartition: return "AT_DetachPartition";
    case AT_DetachPartitionFinalize: return "AT_DetachPartitionFinalize";
    case AT_AddIdentity: return "AT_AddIdentity";
    case AT_SetIdentity: return "AT_SetIdentity";
    case AT_DropIdentity: return "AT_DropIdentity";
    case AT_ReAddStatistics: return "AT_ReAddStatistics";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringGrantTargetType(GrantTargetType value) {
  switch(value) {
    case ACL_TARGET_OBJECT: return "ACL_TARGET_OBJECT";
    case ACL_TARGET_ALL_IN_SCHEMA: return "ACL_TARGET_ALL_IN_SCHEMA";
    case ACL_TARGET_DEFAULTS: return "ACL_TARGET_DEFAULTS";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringVariableSetKind(VariableSetKind value) {
  switch(value) {
    case VAR_SET_VALUE: return "VAR_SET_VALUE";
    case VAR_SET_DEFAULT: return "VAR_SET_DEFAULT";
    case VAR_SET_CURRENT: return "VAR_SET_CURRENT";
    case VAR_SET_MULTI: return "VAR_SET_MULTI";
    case VAR_RESET: return "VAR_RESET";
    case VAR_RESET_ALL: return "VAR_RESET_ALL";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringConstrType(ConstrType value) {
  switch(value) {
    case CONSTR_NULL: return "CONSTR_NULL";
    case CONSTR_NOTNULL: return "CONSTR_NOTNULL";
    case CONSTR_DEFAULT: return "CONSTR_DEFAULT";
    case CONSTR_IDENTITY: return "CONSTR_IDENTITY";
    case CONSTR_GENERATED: return "CONSTR_GENERATED";
    case CONSTR_CHECK: return "CONSTR_CHECK";
    case CONSTR_PRIMARY: return "CONSTR_PRIMARY";
    case CONSTR_UNIQUE: return "CONSTR_UNIQUE";
    case CONSTR_EXCLUSION: return "CONSTR_EXCLUSION";
    case CONSTR_FOREIGN: return "CONSTR_FOREIGN";
    case CONSTR_ATTR_DEFERRABLE: return "CONSTR_ATTR_DEFERRABLE";
    case CONSTR_ATTR_NOT_DEFERRABLE: return "CONSTR_ATTR_NOT_DEFERRABLE";
    case CONSTR_ATTR_DEFERRED: return "CONSTR_ATTR_DEFERRED";
    case CONSTR_ATTR_IMMEDIATE: return "CONSTR_ATTR_IMMEDIATE";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringImportForeignSchemaType(ImportForeignSchemaType value) {
  switch(value) {
    case FDW_IMPORT_SCHEMA_ALL: return "FDW_IMPORT_SCHEMA_ALL";
    case FDW_IMPORT_SCHEMA_LIMIT_TO: return "FDW_IMPORT_SCHEMA_LIMIT_TO";
    case FDW_IMPORT_SCHEMA_EXCEPT: return "FDW_IMPORT_SCHEMA_EXCEPT";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringRoleStmtType(RoleStmtType value) {
  switch(value) {
    case ROLESTMT_ROLE: return "ROLESTMT_ROLE";
    case ROLESTMT_USER: return "ROLESTMT_USER";
    case ROLESTMT_GROUP: return "ROLESTMT_GROUP";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringFetchDirection(FetchDirection value) {
  switch(value) {
    case FETCH_FORWARD: return "FETCH_FORWARD";
    case FETCH_BACKWARD: return "FETCH_BACKWARD";
    case FETCH_ABSOLUTE: return "FETCH_ABSOLUTE";
    case FETCH_RELATIVE: return "FETCH_RELATIVE";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringFunctionParameterMode(FunctionParameterMode value) {
  switch(value) {
    case FUNC_PARAM_IN: return "FUNC_PARAM_IN";
    case FUNC_PARAM_OUT: return "FUNC_PARAM_OUT";
    case FUNC_PARAM_INOUT: return "FUNC_PARAM_INOUT";
    case FUNC_PARAM_VARIADIC: return "FUNC_PARAM_VARIADIC";
    case FUNC_PARAM_TABLE: return "FUNC_PARAM_TABLE";
    case FUNC_PARAM_DEFAULT: return "FUNC_PARAM_DEFAULT";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringTransactionStmtKind(TransactionStmtKind value) {
  switch(value) {
    case TRANS_STMT_BEGIN: return "TRANS_STMT_BEGIN";
    case TRANS_STMT_START: return "TRANS_STMT_START";
    case TRANS_STMT_COMMIT: return "TRANS_STMT_COMMIT";
    case TRANS_STMT_ROLLBACK: return "TRANS_STMT_ROLLBACK";
    case TRANS_STMT_SAVEPOINT: return "TRANS_STMT_SAVEPOINT";
    case TRANS_STMT_RELEASE: return "TRANS_STMT_RELEASE";
    case TRANS_STMT_ROLLBACK_TO: return "TRANS_STMT_ROLLBACK_TO";
    case TRANS_STMT_PREPARE: return "TRANS_STMT_PREPARE";
    case TRANS_STMT_COMMIT_PREPARED: return "TRANS_STMT_COMMIT_PREPARED";
    case TRANS_STMT_ROLLBACK_PREPARED: return "TRANS_STMT_ROLLBACK_PREPARED";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringViewCheckOption(ViewCheckOption value) {
  switch(value) {
    case NO_CHECK_OPTION: return "NO_CHECK_OPTION";
    case LOCAL_CHECK_OPTION: return "LOCAL_CHECK_OPTION";
    case CASCADED_CHECK_OPTION: return "CASCADED_CHECK_OPTION";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringDiscardMode(DiscardMode value) {
  switch(value) {
    case DISCARD_ALL: return "DISCARD_ALL";
    case DISCARD_PLANS: return "DISCARD_PLANS";
    case DISCARD_SEQUENCES: return "DISCARD_SEQUENCES";
    case DISCARD_TEMP: return "DISCARD_TEMP";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringReindexObjectType(ReindexObjectType value) {
  switch(value) {
    case REINDEX_OBJECT_INDEX: return "REINDEX_OBJECT_INDEX";
    case REINDEX_OBJECT_TABLE: return "REINDEX_OBJECT_TABLE";
    case REINDEX_OBJECT_SCHEMA: return "REINDEX_OBJECT_SCHEMA";
    case REINDEX_OBJECT_SYSTEM: return "REINDEX_OBJECT_SYSTEM";
    case REINDEX_OBJECT_DATABASE: return "REINDEX_OBJECT_DATABASE";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringAlterTSConfigType(AlterTSConfigType value) {
  switch(value) {
    case ALTER_TSCONFIG_ADD_MAPPING: return "ALTER_TSCONFIG_ADD_MAPPING";
    case ALTER_TSCONFIG_ALTER_MAPPING_FOR_TOKEN: return "ALTER_TSCONFIG_ALTER_MAPPING_FOR_TOKEN";
    case ALTER_TSCONFIG_REPLACE_DICT: return "ALTER_TSCONFIG_REPLACE_DICT";
    case ALTER_TSCONFIG_REPLACE_DICT_FOR_TOKEN: return "ALTER_TSCONFIG_REPLACE_DICT_FOR_TOKEN";
    case ALTER_TSCONFIG_DROP_MAPPING: return "ALTER_TSCONFIG_DROP_MAPPING";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringPublicationObjSpecType(PublicationObjSpecType value) {
  switch(value) {
    case PUBLICATIONOBJ_TABLE: return "PUBLICATIONOBJ_TABLE";
    case PUBLICATIONOBJ_TABLES_IN_SCHEMA: return "PUBLICATIONOBJ_TABLES_IN_SCHEMA";
    case PUBLICATIONOBJ_TABLES_IN_CUR_SCHEMA: return "PUBLICATIONOBJ_TABLES_IN_CUR_SCHEMA";
    case PUBLICATIONOBJ_CONTINUATION: return "PUBLICATIONOBJ_CONTINUATION";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringAlterPublicationAction(AlterPublicationAction value) {
  switch(value) {
    case AP_AddObjects: return "AP_AddObjects";
    case AP_DropObjects: return "AP_DropObjects";
    case AP_SetObjects: return "AP_SetObjects";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringAlterSubscriptionType(AlterSubscriptionType value) {
  switch(value) {
    case ALTER_SUBSCRIPTION_OPTIONS: return "ALTER_SUBSCRIPTION_OPTIONS";
    case ALTER_SUBSCRIPTION_CONNECTION: return "ALTER_SUBSCRIPTION_CONNECTION";
    case ALTER_SUBSCRIPTION_SET_PUBLICATION: return "ALTER_SUBSCRIPTION_SET_PUBLICATION";
    case ALTER_SUBSCRIPTION_ADD_PUBLICATION: return "ALTER_SUBSCRIPTION_ADD_PUBLICATION";
    case ALTER_SUBSCRIPTION_DROP_PUBLICATION: return "ALTER_SUBSCRIPTION_DROP_PUBLICATION";
    case ALTER_SUBSCRIPTION_REFRESH: return "ALTER_SUBSCRIPTION_REFRESH";
    case ALTER_SUBSCRIPTION_ENABLED: return "ALTER_SUBSCRIPTION_ENABLED";
    case ALTER_SUBSCRIPTION_SKIP: return "ALTER_SUBSCRIPTION_SKIP";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringOverridingKind(OverridingKind value) {
  switch(value) {
    case OVERRIDING_NOT_SET: return "OVERRIDING_NOT_SET";
    case OVERRIDING_USER_VALUE: return "OVERRIDING_USER_VALUE";
    case OVERRIDING_SYSTEM_VALUE: return "OVERRIDING_SYSTEM_VALUE";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringOnCommitAction(OnCommitAction value) {
  switch(value) {
    case ONCOMMIT_NOOP: return "ONCOMMIT_NOOP";
    case ONCOMMIT_PRESERVE_ROWS: return "ONCOMMIT_PRESERVE_ROWS";
    case ONCOMMIT_DELETE_ROWS: return "ONCOMMIT_DELETE_ROWS";
    case ONCOMMIT_DROP: return "ONCOMMIT_DROP";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringTableFuncType(TableFuncType value) {
  switch(value) {
    case TFT_XMLTABLE: return "TFT_XMLTABLE";
    case TFT_JSON_TABLE: return "TFT_JSON_TABLE";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringParamKind(ParamKind value) {
  switch(value) {
    case PARAM_EXTERN: return "PARAM_EXTERN";
    case PARAM_EXEC: return "PARAM_EXEC";
    case PARAM_SUBLINK: return "PARAM_SUBLINK";
    case PARAM_MULTIEXPR: return "PARAM_MULTIEXPR";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringCoercionContext(CoercionContext value) {
  switch(value) {
    case COERCION_IMPLICIT: return "COERCION_IMPLICIT";
    case COERCION_ASSIGNMENT: return "COERCION_ASSIGNMENT";
    case COERCION_PLPGSQL: return "COERCION_PLPGSQL";
    case COERCION_EXPLICIT: return "COERCION_EXPLICIT";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringCoercionForm(CoercionForm value) {
  switch(value) {
    case COERCE_EXPLICIT_CALL: return "COERCE_EXPLICIT_CALL";
    case COERCE_EXPLICIT_CAST: return "COERCE_EXPLICIT_CAST";
    case COERCE_IMPLICIT_CAST: return "COERCE_IMPLICIT_CAST";
    case COERCE_SQL_SYNTAX: return "COERCE_SQL_SYNTAX";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringBoolExprType(BoolExprType value) {
  switch(value) {
    case AND_EXPR: return "AND_EXPR";
    case OR_EXPR: return "OR_EXPR";
    case NOT_EXPR: return "NOT_EXPR";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringSubLinkType(SubLinkType value) {
  switch(value) {
    case EXISTS_SUBLINK: return "EXISTS_SUBLINK";
    case ALL_SUBLINK: return "ALL_SUBLINK";
    case ANY_SUBLINK: return "ANY_SUBLINK";
    case ROWCOMPARE_SUBLINK: return "ROWCOMPARE_SUBLINK";
    case EXPR_SUBLINK: return "EXPR_SUBLINK";
    case MULTIEXPR_SUBLINK: return "MULTIEXPR_SUBLINK";
    case ARRAY_SUBLINK: return "ARRAY_SUBLINK";
    case CTE_SUBLINK: return "CTE_SUBLINK";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringRowCompareType(RowCompareType value) {
  switch(value) {
    case ROWCOMPARE_LT: return "ROWCOMPARE_LT";
    case ROWCOMPARE_LE: return "ROWCOMPARE_LE";
    case ROWCOMPARE_EQ: return "ROWCOMPARE_EQ";
    case ROWCOMPARE_GE: return "ROWCOMPARE_GE";
    case ROWCOMPARE_GT: return "ROWCOMPARE_GT";
    case ROWCOMPARE_NE: return "ROWCOMPARE_NE";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringMinMaxOp(MinMaxOp value) {
  switch(value) {
    case IS_GREATEST: return "IS_GREATEST";
    case IS_LEAST: return "IS_LEAST";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringSQLValueFunctionOp(SQLValueFunctionOp value) {
  switch(value) {
    case SVFOP_CURRENT_DATE: return "SVFOP_CURRENT_DATE";
    case SVFOP_CURRENT_TIME: return "SVFOP_CURRENT_TIME";
    case SVFOP_CURRENT_TIME_N: return "SVFOP_CURRENT_TIME_N";
    case SVFOP_CURRENT_TIMESTAMP: return "SVFOP_CURRENT_TIMESTAMP";
    case SVFOP_CURRENT_TIMESTAMP_N: return "SVFOP_CURRENT_TIMESTAMP_N";
    case SVFOP_LOCALTIME: return "SVFOP_LOCALTIME";
    case SVFOP_LOCALTIME_N: return "SVFOP_LOCALTIME_N";
    case SVFOP_LOCALTIMESTAMP: return "SVFOP_LOCALTIMESTAMP";
    case SVFOP_LOCALTIMESTAMP_N: return "SVFOP_LOCALTIMESTAMP_N";
    case SVFOP_CURRENT_ROLE: return "SVFOP_CURRENT_ROLE";
    case SVFOP_CURRENT_USER: return "SVFOP_CURRENT_USER";
    case SVFOP_USER: return "SVFOP_USER";
    case SVFOP_SESSION_USER: return "SVFOP_SESSION_USER";
    case SVFOP_CURRENT_CATALOG: return "SVFOP_CURRENT_CATALOG";
    case SVFOP_CURRENT_SCHEMA: return "SVFOP_CURRENT_SCHEMA";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringXmlExprOp(XmlExprOp value) {
  switch(value) {
    case IS_XMLCONCAT: return "IS_XMLCONCAT";
    case IS_XMLELEMENT: return "IS_XMLELEMENT";
    case IS_XMLFOREST: return "IS_XMLFOREST";
    case IS_XMLPARSE: return "IS_XMLPARSE";
    case IS_XMLPI: return "IS_XMLPI";
    case IS_XMLROOT: return "IS_XMLROOT";
    case IS_XMLSERIALIZE: return "IS_XMLSERIALIZE";
    case IS_DOCUMENT: return "IS_DOCUMENT";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringXmlOptionType(XmlOptionType value) {
  switch(value) {
    case XMLOPTION_DOCUMENT: return "XMLOPTION_DOCUMENT";
    case XMLOPTION_CONTENT: return "XMLOPTION_CONTENT";
  }
  Assert(false);
  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";
    case JSCTOR_JSON_PARSE: return "JSCTOR_JSON_PARSE";
    case JSCTOR_JSON_SCALAR: return "JSCTOR_JSON_SCALAR";
    case JSCTOR_JSON_SERIALIZE: return "JSCTOR_JSON_SERIALIZE";
  }
  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*
_enumToStringJsonWrapper(JsonWrapper value) {
  switch(value) {
    case JSW_UNSPEC: return "JSW_UNSPEC";
    case JSW_NONE: return "JSW_NONE";
    case JSW_CONDITIONAL: return "JSW_CONDITIONAL";
    case JSW_UNCONDITIONAL: return "JSW_UNCONDITIONAL";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringJsonBehaviorType(JsonBehaviorType value) {
  switch(value) {
    case JSON_BEHAVIOR_NULL: return "JSON_BEHAVIOR_NULL";
    case JSON_BEHAVIOR_ERROR: return "JSON_BEHAVIOR_ERROR";
    case JSON_BEHAVIOR_EMPTY: return "JSON_BEHAVIOR_EMPTY";
    case JSON_BEHAVIOR_TRUE: return "JSON_BEHAVIOR_TRUE";
    case JSON_BEHAVIOR_FALSE: return "JSON_BEHAVIOR_FALSE";
    case JSON_BEHAVIOR_UNKNOWN: return "JSON_BEHAVIOR_UNKNOWN";
    case JSON_BEHAVIOR_EMPTY_ARRAY: return "JSON_BEHAVIOR_EMPTY_ARRAY";
    case JSON_BEHAVIOR_EMPTY_OBJECT: return "JSON_BEHAVIOR_EMPTY_OBJECT";
    case JSON_BEHAVIOR_DEFAULT: return "JSON_BEHAVIOR_DEFAULT";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringJsonExprOp(JsonExprOp value) {
  switch(value) {
    case JSON_EXISTS_OP: return "JSON_EXISTS_OP";
    case JSON_QUERY_OP: return "JSON_QUERY_OP";
    case JSON_VALUE_OP: return "JSON_VALUE_OP";
    case JSON_TABLE_OP: return "JSON_TABLE_OP";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringNullTestType(NullTestType value) {
  switch(value) {
    case IS_NULL: return "IS_NULL";
    case IS_NOT_NULL: return "IS_NOT_NULL";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringBoolTestType(BoolTestType value) {
  switch(value) {
    case IS_TRUE: return "IS_TRUE";
    case IS_NOT_TRUE: return "IS_NOT_TRUE";
    case IS_FALSE: return "IS_FALSE";
    case IS_NOT_FALSE: return "IS_NOT_FALSE";
    case IS_UNKNOWN: return "IS_UNKNOWN";
    case IS_NOT_UNKNOWN: return "IS_NOT_UNKNOWN";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringMergeMatchKind(MergeMatchKind value) {
  switch(value) {
    case MERGE_WHEN_MATCHED: return "MERGE_WHEN_MATCHED";
    case MERGE_WHEN_NOT_MATCHED_BY_SOURCE: return "MERGE_WHEN_NOT_MATCHED_BY_SOURCE";
    case MERGE_WHEN_NOT_MATCHED_BY_TARGET: return "MERGE_WHEN_NOT_MATCHED_BY_TARGET";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringCmdType(CmdType value) {
  switch(value) {
    case CMD_UNKNOWN: return "CMD_UNKNOWN";
    case CMD_SELECT: return "CMD_SELECT";
    case CMD_UPDATE: return "CMD_UPDATE";
    case CMD_INSERT: return "CMD_INSERT";
    case CMD_DELETE: return "CMD_DELETE";
    case CMD_MERGE: return "CMD_MERGE";
    case CMD_UTILITY: return "CMD_UTILITY";
    case CMD_NOTHING: return "CMD_NOTHING";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringJoinType(JoinType value) {
  switch(value) {
    case JOIN_INNER: return "JOIN_INNER";
    case JOIN_LEFT: return "JOIN_LEFT";
    case JOIN_FULL: return "JOIN_FULL";
    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";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringAggStrategy(AggStrategy value) {
  switch(value) {
    case AGG_PLAIN: return "AGG_PLAIN";
    case AGG_SORTED: return "AGG_SORTED";
    case AGG_HASHED: return "AGG_HASHED";
    case AGG_MIXED: return "AGG_MIXED";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringAggSplit(AggSplit value) {
  switch(value) {
    case AGGSPLIT_SIMPLE: return "AGGSPLIT_SIMPLE";
    case AGGSPLIT_INITIAL_SERIAL: return "AGGSPLIT_INITIAL_SERIAL";
    case AGGSPLIT_FINAL_DESERIAL: return "AGGSPLIT_FINAL_DESERIAL";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringSetOpCmd(SetOpCmd value) {
  switch(value) {
    case SETOPCMD_INTERSECT: return "SETOPCMD_INTERSECT";
    case SETOPCMD_INTERSECT_ALL: return "SETOPCMD_INTERSECT_ALL";
    case SETOPCMD_EXCEPT: return "SETOPCMD_EXCEPT";
    case SETOPCMD_EXCEPT_ALL: return "SETOPCMD_EXCEPT_ALL";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringSetOpStrategy(SetOpStrategy value) {
  switch(value) {
    case SETOP_SORTED: return "SETOP_SORTED";
    case SETOP_HASHED: return "SETOP_HASHED";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringOnConflictAction(OnConflictAction value) {
  switch(value) {
    case ONCONFLICT_NONE: return "ONCONFLICT_NONE";
    case ONCONFLICT_NOTHING: return "ONCONFLICT_NOTHING";
    case ONCONFLICT_UPDATE: return "ONCONFLICT_UPDATE";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringLimitOption(LimitOption value) {
  switch(value) {
    case LIMIT_OPTION_DEFAULT: return "LIMIT_OPTION_DEFAULT";
    case LIMIT_OPTION_COUNT: return "LIMIT_OPTION_COUNT";
    case LIMIT_OPTION_WITH_TIES: return "LIMIT_OPTION_WITH_TIES";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringLockClauseStrength(LockClauseStrength value) {
  switch(value) {
    case LCS_NONE: return "LCS_NONE";
    case LCS_FORKEYSHARE: return "LCS_FORKEYSHARE";
    case LCS_FORSHARE: return "LCS_FORSHARE";
    case LCS_FORNOKEYUPDATE: return "LCS_FORNOKEYUPDATE";
    case LCS_FORUPDATE: return "LCS_FORUPDATE";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringLockWaitPolicy(LockWaitPolicy value) {
  switch(value) {
    case LockWaitBlock: return "LockWaitBlock";
    case LockWaitSkip: return "LockWaitSkip";
    case LockWaitError: return "LockWaitError";
  }
  Assert(false);
  return NULL;
}

static const char*
_enumToStringLockTupleMode(LockTupleMode value) {
  switch(value) {
    case LockTupleKeyShare: return "LockTupleKeyShare";
    case LockTupleShare: return "LockTupleShare";
    case LockTupleNoKeyExclusive: return "LockTupleNoKeyExclusive";
    case LockTupleExclusive: return "LockTupleExclusive";
  }
  Assert(false);
  return NULL;
}static int
_enumToIntQuerySource(QuerySource value) {
  switch(value) {
    case QSRC_ORIGINAL: return 1;
    case QSRC_PARSER: return 2;
    case QSRC_INSTEAD_RULE: return 3;
    case QSRC_QUAL_INSTEAD_RULE: return 4;
    case QSRC_NON_INSTEAD_RULE: return 5;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntSortByDir(SortByDir value) {
  switch(value) {
    case SORTBY_DEFAULT: return 1;
    case SORTBY_ASC: return 2;
    case SORTBY_DESC: return 3;
    case SORTBY_USING: return 4;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntSortByNulls(SortByNulls value) {
  switch(value) {
    case SORTBY_NULLS_DEFAULT: return 1;
    case SORTBY_NULLS_FIRST: return 2;
    case SORTBY_NULLS_LAST: return 3;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntSetQuantifier(SetQuantifier value) {
  switch(value) {
    case SET_QUANTIFIER_DEFAULT: return 1;
    case SET_QUANTIFIER_ALL: return 2;
    case SET_QUANTIFIER_DISTINCT: return 3;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntA_Expr_Kind(A_Expr_Kind value) {
  switch(value) {
    case AEXPR_OP: return 1;
    case AEXPR_OP_ANY: return 2;
    case AEXPR_OP_ALL: return 3;
    case AEXPR_DISTINCT: return 4;
    case AEXPR_NOT_DISTINCT: return 5;
    case AEXPR_NULLIF: return 6;
    case AEXPR_IN: return 7;
    case AEXPR_LIKE: return 8;
    case AEXPR_ILIKE: return 9;
    case AEXPR_SIMILAR: return 10;
    case AEXPR_BETWEEN: return 11;
    case AEXPR_NOT_BETWEEN: return 12;
    case AEXPR_BETWEEN_SYM: return 13;
    case AEXPR_NOT_BETWEEN_SYM: return 14;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntRoleSpecType(RoleSpecType value) {
  switch(value) {
    case ROLESPEC_CSTRING: return 1;
    case ROLESPEC_CURRENT_ROLE: return 2;
    case ROLESPEC_CURRENT_USER: return 3;
    case ROLESPEC_SESSION_USER: return 4;
    case ROLESPEC_PUBLIC: return 5;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntTableLikeOption(TableLikeOption value) {
  switch(value) {
    case CREATE_TABLE_LIKE_COMMENTS: return 1;
    case CREATE_TABLE_LIKE_COMPRESSION: return 2;
    case CREATE_TABLE_LIKE_CONSTRAINTS: return 3;
    case CREATE_TABLE_LIKE_DEFAULTS: return 4;
    case CREATE_TABLE_LIKE_GENERATED: return 5;
    case CREATE_TABLE_LIKE_IDENTITY: return 6;
    case CREATE_TABLE_LIKE_INDEXES: return 7;
    case CREATE_TABLE_LIKE_STATISTICS: return 8;
    case CREATE_TABLE_LIKE_STORAGE: return 9;
    case CREATE_TABLE_LIKE_ALL: return 10;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntDefElemAction(DefElemAction value) {
  switch(value) {
    case DEFELEM_UNSPEC: return 1;
    case DEFELEM_SET: return 2;
    case DEFELEM_ADD: return 3;
    case DEFELEM_DROP: return 4;
  }
  Assert(false);
  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) {
    case PARTITION_RANGE_DATUM_MINVALUE: return 1;
    case PARTITION_RANGE_DATUM_VALUE: return 2;
    case PARTITION_RANGE_DATUM_MAXVALUE: return 3;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntRTEKind(RTEKind value) {
  switch(value) {
    case RTE_RELATION: return 1;
    case RTE_SUBQUERY: return 2;
    case RTE_JOIN: return 3;
    case RTE_FUNCTION: return 4;
    case RTE_TABLEFUNC: return 5;
    case RTE_VALUES: return 6;
    case RTE_CTE: return 7;
    case RTE_NAMEDTUPLESTORE: return 8;
    case RTE_RESULT: return 9;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntWCOKind(WCOKind value) {
  switch(value) {
    case WCO_VIEW_CHECK: return 1;
    case WCO_RLS_INSERT_CHECK: return 2;
    case WCO_RLS_UPDATE_CHECK: return 3;
    case WCO_RLS_CONFLICT_CHECK: return 4;
    case WCO_RLS_MERGE_UPDATE_CHECK: return 5;
    case WCO_RLS_MERGE_DELETE_CHECK: return 6;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntGroupingSetKind(GroupingSetKind value) {
  switch(value) {
    case GROUPING_SET_EMPTY: return 1;
    case GROUPING_SET_SIMPLE: return 2;
    case GROUPING_SET_ROLLUP: return 3;
    case GROUPING_SET_CUBE: return 4;
    case GROUPING_SET_SETS: return 5;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntCTEMaterialize(CTEMaterialize value) {
  switch(value) {
    case CTEMaterializeDefault: return 1;
    case CTEMaterializeAlways: return 2;
    case CTEMaterializeNever: return 3;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntJsonQuotes(JsonQuotes value) {
  switch(value) {
    case JS_QUOTES_UNSPEC: return 1;
    case JS_QUOTES_KEEP: return 2;
    case JS_QUOTES_OMIT: return 3;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntJsonTableColumnType(JsonTableColumnType value) {
  switch(value) {
    case JTC_FOR_ORDINALITY: return 1;
    case JTC_REGULAR: return 2;
    case JTC_EXISTS: return 3;
    case JTC_FORMATTED: return 4;
    case JTC_NESTED: return 5;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntSetOperation(SetOperation value) {
  switch(value) {
    case SETOP_NONE: return 1;
    case SETOP_UNION: return 2;
    case SETOP_INTERSECT: return 3;
    case SETOP_EXCEPT: return 4;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntObjectType(ObjectType value) {
  switch(value) {
    case OBJECT_ACCESS_METHOD: return 1;
    case OBJECT_AGGREGATE: return 2;
    case OBJECT_AMOP: return 3;
    case OBJECT_AMPROC: return 4;
    case OBJECT_ATTRIBUTE: return 5;
    case OBJECT_CAST: return 6;
    case OBJECT_COLUMN: return 7;
    case OBJECT_COLLATION: return 8;
    case OBJECT_CONVERSION: return 9;
    case OBJECT_DATABASE: return 10;
    case OBJECT_DEFAULT: return 11;
    case OBJECT_DEFACL: return 12;
    case OBJECT_DOMAIN: return 13;
    case OBJECT_DOMCONSTRAINT: return 14;
    case OBJECT_EVENT_TRIGGER: return 15;
    case OBJECT_EXTENSION: return 16;
    case OBJECT_FDW: return 17;
    case OBJECT_FOREIGN_SERVER: return 18;
    case OBJECT_FOREIGN_TABLE: return 19;
    case OBJECT_FUNCTION: return 20;
    case OBJECT_INDEX: return 21;
    case OBJECT_LANGUAGE: return 22;
    case OBJECT_LARGEOBJECT: return 23;
    case OBJECT_MATVIEW: return 24;
    case OBJECT_OPCLASS: return 25;
    case OBJECT_OPERATOR: return 26;
    case OBJECT_OPFAMILY: return 27;
    case OBJECT_PARAMETER_ACL: return 28;
    case OBJECT_POLICY: return 29;
    case OBJECT_PROCEDURE: return 30;
    case OBJECT_PUBLICATION: return 31;
    case OBJECT_PUBLICATION_NAMESPACE: return 32;
    case OBJECT_PUBLICATION_REL: return 33;
    case OBJECT_ROLE: return 34;
    case OBJECT_ROUTINE: return 35;
    case OBJECT_RULE: return 36;
    case OBJECT_SCHEMA: return 37;
    case OBJECT_SEQUENCE: return 38;
    case OBJECT_SUBSCRIPTION: return 39;
    case OBJECT_STATISTIC_EXT: return 40;
    case OBJECT_TABCONSTRAINT: return 41;
    case OBJECT_TABLE: return 42;
    case OBJECT_TABLESPACE: return 43;
    case OBJECT_TRANSFORM: return 44;
    case OBJECT_TRIGGER: return 45;
    case OBJECT_TSCONFIGURATION: return 46;
    case OBJECT_TSDICTIONARY: return 47;
    case OBJECT_TSPARSER: return 48;
    case OBJECT_TSTEMPLATE: return 49;
    case OBJECT_TYPE: return 50;
    case OBJECT_USER_MAPPING: return 51;
    case OBJECT_VIEW: return 52;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntDropBehavior(DropBehavior value) {
  switch(value) {
    case DROP_RESTRICT: return 1;
    case DROP_CASCADE: return 2;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntAlterTableType(AlterTableType value) {
  switch(value) {
    case AT_AddColumn: return 1;
    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_SetExpression: 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_AddIndex: return 16;
    case AT_ReAddIndex: return 17;
    case AT_AddConstraint: return 18;
    case AT_ReAddConstraint: return 19;
    case AT_ReAddDomainConstraint: return 20;
    case AT_AlterConstraint: return 21;
    case AT_ValidateConstraint: return 22;
    case AT_AddIndexConstraint: return 23;
    case AT_DropConstraint: return 24;
    case AT_ReAddComment: return 25;
    case AT_AlterColumnType: return 26;
    case AT_AlterColumnGenericOptions: return 27;
    case AT_ChangeOwner: return 28;
    case AT_ClusterOn: return 29;
    case AT_DropCluster: return 30;
    case AT_SetLogged: return 31;
    case AT_SetUnLogged: return 32;
    case AT_DropOids: return 33;
    case AT_SetAccessMethod: return 34;
    case AT_SetTableSpace: return 35;
    case AT_SetRelOptions: return 36;
    case AT_ResetRelOptions: return 37;
    case AT_ReplaceRelOptions: return 38;
    case AT_EnableTrig: return 39;
    case AT_EnableAlwaysTrig: return 40;
    case AT_EnableReplicaTrig: return 41;
    case AT_DisableTrig: return 42;
    case AT_EnableTrigAll: return 43;
    case AT_DisableTrigAll: return 44;
    case AT_EnableTrigUser: return 45;
    case AT_DisableTrigUser: return 46;
    case AT_EnableRule: return 47;
    case AT_EnableAlwaysRule: return 48;
    case AT_EnableReplicaRule: return 49;
    case AT_DisableRule: return 50;
    case AT_AddInherit: return 51;
    case AT_DropInherit: return 52;
    case AT_AddOf: return 53;
    case AT_DropOf: return 54;
    case AT_ReplicaIdentity: return 55;
    case AT_EnableRowSecurity: return 56;
    case AT_DisableRowSecurity: return 57;
    case AT_ForceRowSecurity: return 58;
    case AT_NoForceRowSecurity: return 59;
    case AT_GenericOptions: return 60;
    case AT_AttachPartition: return 61;
    case AT_DetachPartition: return 62;
    case AT_DetachPartitionFinalize: return 63;
    case AT_AddIdentity: return 64;
    case AT_SetIdentity: return 65;
    case AT_DropIdentity: return 66;
    case AT_ReAddStatistics: return 67;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntGrantTargetType(GrantTargetType value) {
  switch(value) {
    case ACL_TARGET_OBJECT: return 1;
    case ACL_TARGET_ALL_IN_SCHEMA: return 2;
    case ACL_TARGET_DEFAULTS: return 3;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntVariableSetKind(VariableSetKind value) {
  switch(value) {
    case VAR_SET_VALUE: return 1;
    case VAR_SET_DEFAULT: return 2;
    case VAR_SET_CURRENT: return 3;
    case VAR_SET_MULTI: return 4;
    case VAR_RESET: return 5;
    case VAR_RESET_ALL: return 6;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntConstrType(ConstrType value) {
  switch(value) {
    case CONSTR_NULL: return 1;
    case CONSTR_NOTNULL: return 2;
    case CONSTR_DEFAULT: return 3;
    case CONSTR_IDENTITY: return 4;
    case CONSTR_GENERATED: return 5;
    case CONSTR_CHECK: return 6;
    case CONSTR_PRIMARY: return 7;
    case CONSTR_UNIQUE: return 8;
    case CONSTR_EXCLUSION: return 9;
    case CONSTR_FOREIGN: return 10;
    case CONSTR_ATTR_DEFERRABLE: return 11;
    case CONSTR_ATTR_NOT_DEFERRABLE: return 12;
    case CONSTR_ATTR_DEFERRED: return 13;
    case CONSTR_ATTR_IMMEDIATE: return 14;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntImportForeignSchemaType(ImportForeignSchemaType value) {
  switch(value) {
    case FDW_IMPORT_SCHEMA_ALL: return 1;
    case FDW_IMPORT_SCHEMA_LIMIT_TO: return 2;
    case FDW_IMPORT_SCHEMA_EXCEPT: return 3;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntRoleStmtType(RoleStmtType value) {
  switch(value) {
    case ROLESTMT_ROLE: return 1;
    case ROLESTMT_USER: return 2;
    case ROLESTMT_GROUP: return 3;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntFetchDirection(FetchDirection value) {
  switch(value) {
    case FETCH_FORWARD: return 1;
    case FETCH_BACKWARD: return 2;
    case FETCH_ABSOLUTE: return 3;
    case FETCH_RELATIVE: return 4;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntFunctionParameterMode(FunctionParameterMode value) {
  switch(value) {
    case FUNC_PARAM_IN: return 1;
    case FUNC_PARAM_OUT: return 2;
    case FUNC_PARAM_INOUT: return 3;
    case FUNC_PARAM_VARIADIC: return 4;
    case FUNC_PARAM_TABLE: return 5;
    case FUNC_PARAM_DEFAULT: return 6;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntTransactionStmtKind(TransactionStmtKind value) {
  switch(value) {
    case TRANS_STMT_BEGIN: return 1;
    case TRANS_STMT_START: return 2;
    case TRANS_STMT_COMMIT: return 3;
    case TRANS_STMT_ROLLBACK: return 4;
    case TRANS_STMT_SAVEPOINT: return 5;
    case TRANS_STMT_RELEASE: return 6;
    case TRANS_STMT_ROLLBACK_TO: return 7;
    case TRANS_STMT_PREPARE: return 8;
    case TRANS_STMT_COMMIT_PREPARED: return 9;
    case TRANS_STMT_ROLLBACK_PREPARED: return 10;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntViewCheckOption(ViewCheckOption value) {
  switch(value) {
    case NO_CHECK_OPTION: return 1;
    case LOCAL_CHECK_OPTION: return 2;
    case CASCADED_CHECK_OPTION: return 3;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntDiscardMode(DiscardMode value) {
  switch(value) {
    case DISCARD_ALL: return 1;
    case DISCARD_PLANS: return 2;
    case DISCARD_SEQUENCES: return 3;
    case DISCARD_TEMP: return 4;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntReindexObjectType(ReindexObjectType value) {
  switch(value) {
    case REINDEX_OBJECT_INDEX: return 1;
    case REINDEX_OBJECT_TABLE: return 2;
    case REINDEX_OBJECT_SCHEMA: return 3;
    case REINDEX_OBJECT_SYSTEM: return 4;
    case REINDEX_OBJECT_DATABASE: return 5;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntAlterTSConfigType(AlterTSConfigType value) {
  switch(value) {
    case ALTER_TSCONFIG_ADD_MAPPING: return 1;
    case ALTER_TSCONFIG_ALTER_MAPPING_FOR_TOKEN: return 2;
    case ALTER_TSCONFIG_REPLACE_DICT: return 3;
    case ALTER_TSCONFIG_REPLACE_DICT_FOR_TOKEN: return 4;
    case ALTER_TSCONFIG_DROP_MAPPING: return 5;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntPublicationObjSpecType(PublicationObjSpecType value) {
  switch(value) {
    case PUBLICATIONOBJ_TABLE: return 1;
    case PUBLICATIONOBJ_TABLES_IN_SCHEMA: return 2;
    case PUBLICATIONOBJ_TABLES_IN_CUR_SCHEMA: return 3;
    case PUBLICATIONOBJ_CONTINUATION: return 4;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntAlterPublicationAction(AlterPublicationAction value) {
  switch(value) {
    case AP_AddObjects: return 1;
    case AP_DropObjects: return 2;
    case AP_SetObjects: return 3;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntAlterSubscriptionType(AlterSubscriptionType value) {
  switch(value) {
    case ALTER_SUBSCRIPTION_OPTIONS: return 1;
    case ALTER_SUBSCRIPTION_CONNECTION: return 2;
    case ALTER_SUBSCRIPTION_SET_PUBLICATION: return 3;
    case ALTER_SUBSCRIPTION_ADD_PUBLICATION: return 4;
    case ALTER_SUBSCRIPTION_DROP_PUBLICATION: return 5;
    case ALTER_SUBSCRIPTION_REFRESH: return 6;
    case ALTER_SUBSCRIPTION_ENABLED: return 7;
    case ALTER_SUBSCRIPTION_SKIP: return 8;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntOverridingKind(OverridingKind value) {
  switch(value) {
    case OVERRIDING_NOT_SET: return 1;
    case OVERRIDING_USER_VALUE: return 2;
    case OVERRIDING_SYSTEM_VALUE: return 3;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntOnCommitAction(OnCommitAction value) {
  switch(value) {
    case ONCOMMIT_NOOP: return 1;
    case ONCOMMIT_PRESERVE_ROWS: return 2;
    case ONCOMMIT_DELETE_ROWS: return 3;
    case ONCOMMIT_DROP: return 4;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntTableFuncType(TableFuncType value) {
  switch(value) {
    case TFT_XMLTABLE: return 1;
    case TFT_JSON_TABLE: return 2;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntParamKind(ParamKind value) {
  switch(value) {
    case PARAM_EXTERN: return 1;
    case PARAM_EXEC: return 2;
    case PARAM_SUBLINK: return 3;
    case PARAM_MULTIEXPR: return 4;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntCoercionContext(CoercionContext value) {
  switch(value) {
    case COERCION_IMPLICIT: return 1;
    case COERCION_ASSIGNMENT: return 2;
    case COERCION_PLPGSQL: return 3;
    case COERCION_EXPLICIT: return 4;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntCoercionForm(CoercionForm value) {
  switch(value) {
    case COERCE_EXPLICIT_CALL: return 1;
    case COERCE_EXPLICIT_CAST: return 2;
    case COERCE_IMPLICIT_CAST: return 3;
    case COERCE_SQL_SYNTAX: return 4;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntBoolExprType(BoolExprType value) {
  switch(value) {
    case AND_EXPR: return 1;
    case OR_EXPR: return 2;
    case NOT_EXPR: return 3;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntSubLinkType(SubLinkType value) {
  switch(value) {
    case EXISTS_SUBLINK: return 1;
    case ALL_SUBLINK: return 2;
    case ANY_SUBLINK: return 3;
    case ROWCOMPARE_SUBLINK: return 4;
    case EXPR_SUBLINK: return 5;
    case MULTIEXPR_SUBLINK: return 6;
    case ARRAY_SUBLINK: return 7;
    case CTE_SUBLINK: return 8;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntRowCompareType(RowCompareType value) {
  switch(value) {
    case ROWCOMPARE_LT: return 1;
    case ROWCOMPARE_LE: return 2;
    case ROWCOMPARE_EQ: return 3;
    case ROWCOMPARE_GE: return 4;
    case ROWCOMPARE_GT: return 5;
    case ROWCOMPARE_NE: return 6;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntMinMaxOp(MinMaxOp value) {
  switch(value) {
    case IS_GREATEST: return 1;
    case IS_LEAST: return 2;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntSQLValueFunctionOp(SQLValueFunctionOp value) {
  switch(value) {
    case SVFOP_CURRENT_DATE: return 1;
    case SVFOP_CURRENT_TIME: return 2;
    case SVFOP_CURRENT_TIME_N: return 3;
    case SVFOP_CURRENT_TIMESTAMP: return 4;
    case SVFOP_CURRENT_TIMESTAMP_N: return 5;
    case SVFOP_LOCALTIME: return 6;
    case SVFOP_LOCALTIME_N: return 7;
    case SVFOP_LOCALTIMESTAMP: return 8;
    case SVFOP_LOCALTIMESTAMP_N: return 9;
    case SVFOP_CURRENT_ROLE: return 10;
    case SVFOP_CURRENT_USER: return 11;
    case SVFOP_USER: return 12;
    case SVFOP_SESSION_USER: return 13;
    case SVFOP_CURRENT_CATALOG: return 14;
    case SVFOP_CURRENT_SCHEMA: return 15;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntXmlExprOp(XmlExprOp value) {
  switch(value) {
    case IS_XMLCONCAT: return 1;
    case IS_XMLELEMENT: return 2;
    case IS_XMLFOREST: return 3;
    case IS_XMLPARSE: return 4;
    case IS_XMLPI: return 5;
    case IS_XMLROOT: return 6;
    case IS_XMLSERIALIZE: return 7;
    case IS_DOCUMENT: return 8;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntXmlOptionType(XmlOptionType value) {
  switch(value) {
    case XMLOPTION_DOCUMENT: return 1;
    case XMLOPTION_CONTENT: return 2;
  }
  Assert(false);
  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;
    case JSCTOR_JSON_PARSE: return 5;
    case JSCTOR_JSON_SCALAR: return 6;
    case JSCTOR_JSON_SERIALIZE: return 7;
  }
  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
_enumToIntJsonWrapper(JsonWrapper value) {
  switch(value) {
    case JSW_UNSPEC: return 1;
    case JSW_NONE: return 2;
    case JSW_CONDITIONAL: return 3;
    case JSW_UNCONDITIONAL: return 4;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntJsonBehaviorType(JsonBehaviorType value) {
  switch(value) {
    case JSON_BEHAVIOR_NULL: return 1;
    case JSON_BEHAVIOR_ERROR: return 2;
    case JSON_BEHAVIOR_EMPTY: return 3;
    case JSON_BEHAVIOR_TRUE: return 4;
    case JSON_BEHAVIOR_FALSE: return 5;
    case JSON_BEHAVIOR_UNKNOWN: return 6;
    case JSON_BEHAVIOR_EMPTY_ARRAY: return 7;
    case JSON_BEHAVIOR_EMPTY_OBJECT: return 8;
    case JSON_BEHAVIOR_DEFAULT: return 9;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntJsonExprOp(JsonExprOp value) {
  switch(value) {
    case JSON_EXISTS_OP: return 1;
    case JSON_QUERY_OP: return 2;
    case JSON_VALUE_OP: return 3;
    case JSON_TABLE_OP: return 4;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntNullTestType(NullTestType value) {
  switch(value) {
    case IS_NULL: return 1;
    case IS_NOT_NULL: return 2;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntBoolTestType(BoolTestType value) {
  switch(value) {
    case IS_TRUE: return 1;
    case IS_NOT_TRUE: return 2;
    case IS_FALSE: return 3;
    case IS_NOT_FALSE: return 4;
    case IS_UNKNOWN: return 5;
    case IS_NOT_UNKNOWN: return 6;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntMergeMatchKind(MergeMatchKind value) {
  switch(value) {
    case MERGE_WHEN_MATCHED: return 1;
    case MERGE_WHEN_NOT_MATCHED_BY_SOURCE: return 2;
    case MERGE_WHEN_NOT_MATCHED_BY_TARGET: return 3;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntCmdType(CmdType value) {
  switch(value) {
    case CMD_UNKNOWN: return 1;
    case CMD_SELECT: return 2;
    case CMD_UPDATE: return 3;
    case CMD_INSERT: return 4;
    case CMD_DELETE: return 5;
    case CMD_MERGE: return 6;
    case CMD_UTILITY: return 7;
    case CMD_NOTHING: return 8;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntJoinType(JoinType value) {
  switch(value) {
    case JOIN_INNER: return 1;
    case JOIN_LEFT: return 2;
    case JOIN_FULL: return 3;
    case JOIN_RIGHT: return 4;
    case JOIN_SEMI: return 5;
    case JOIN_ANTI: return 6;
    case JOIN_RIGHT_ANTI: return 7;
    case JOIN_UNIQUE_OUTER: return 8;
    case JOIN_UNIQUE_INNER: return 9;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntAggStrategy(AggStrategy value) {
  switch(value) {
    case AGG_PLAIN: return 1;
    case AGG_SORTED: return 2;
    case AGG_HASHED: return 3;
    case AGG_MIXED: return 4;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntAggSplit(AggSplit value) {
  switch(value) {
    case AGGSPLIT_SIMPLE: return 1;
    case AGGSPLIT_INITIAL_SERIAL: return 2;
    case AGGSPLIT_FINAL_DESERIAL: return 3;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntSetOpCmd(SetOpCmd value) {
  switch(value) {
    case SETOPCMD_INTERSECT: return 1;
    case SETOPCMD_INTERSECT_ALL: return 2;
    case SETOPCMD_EXCEPT: return 3;
    case SETOPCMD_EXCEPT_ALL: return 4;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntSetOpStrategy(SetOpStrategy value) {
  switch(value) {
    case SETOP_SORTED: return 1;
    case SETOP_HASHED: return 2;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntOnConflictAction(OnConflictAction value) {
  switch(value) {
    case ONCONFLICT_NONE: return 1;
    case ONCONFLICT_NOTHING: return 2;
    case ONCONFLICT_UPDATE: return 3;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntLimitOption(LimitOption value) {
  switch(value) {
    case LIMIT_OPTION_DEFAULT: return 1;
    case LIMIT_OPTION_COUNT: return 2;
    case LIMIT_OPTION_WITH_TIES: return 3;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntLockClauseStrength(LockClauseStrength value) {
  switch(value) {
    case LCS_NONE: return 1;
    case LCS_FORKEYSHARE: return 2;
    case LCS_FORSHARE: return 3;
    case LCS_FORNOKEYUPDATE: return 4;
    case LCS_FORUPDATE: return 5;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntLockWaitPolicy(LockWaitPolicy value) {
  switch(value) {
    case LockWaitBlock: return 1;
    case LockWaitSkip: return 2;
    case LockWaitError: return 3;
  }
  Assert(false);
  return -1;
}

static int
_enumToIntLockTupleMode(LockTupleMode value) {
  switch(value) {
    case LockTupleKeyShare: return 1;
    case LockTupleShare: return 2;
    case LockTupleNoKeyExclusive: return 3;
    case LockTupleExclusive: return 4;
  }
  Assert(false);
  return -1;
}static QuerySource
_intToEnumQuerySource(int value) {
  switch(value) {
    case 1: return QSRC_ORIGINAL;
    case 2: return QSRC_PARSER;
    case 3: return QSRC_INSTEAD_RULE;
    case 4: return QSRC_QUAL_INSTEAD_RULE;
    case 5: return QSRC_NON_INSTEAD_RULE;
  }
  Assert(false);
  return QSRC_ORIGINAL;
}

static SortByDir
_intToEnumSortByDir(int value) {
  switch(value) {
    case 1: return SORTBY_DEFAULT;
    case 2: return SORTBY_ASC;
    case 3: return SORTBY_DESC;
    case 4: return SORTBY_USING;
  }
  Assert(false);
  return SORTBY_DEFAULT;
}

static SortByNulls
_intToEnumSortByNulls(int value) {
  switch(value) {
    case 1: return SORTBY_NULLS_DEFAULT;
    case 2: return SORTBY_NULLS_FIRST;
    case 3: return SORTBY_NULLS_LAST;
  }
  Assert(false);
  return SORTBY_NULLS_DEFAULT;
}

static SetQuantifier
_intToEnumSetQuantifier(int value) {
  switch(value) {
    case 1: return SET_QUANTIFIER_DEFAULT;
    case 2: return SET_QUANTIFIER_ALL;
    case 3: return SET_QUANTIFIER_DISTINCT;
  }
  Assert(false);
  return SET_QUANTIFIER_DEFAULT;
}

static A_Expr_Kind
_intToEnumA_Expr_Kind(int value) {
  switch(value) {
    case 1: return AEXPR_OP;
    case 2: return AEXPR_OP_ANY;
    case 3: return AEXPR_OP_ALL;
    case 4: return AEXPR_DISTINCT;
    case 5: return AEXPR_NOT_DISTINCT;
    case 6: return AEXPR_NULLIF;
    case 7: return AEXPR_IN;
    case 8: return AEXPR_LIKE;
    case 9: return AEXPR_ILIKE;
    case 10: return AEXPR_SIMILAR;
    case 11: return AEXPR_BETWEEN;
    case 12: return AEXPR_NOT_BETWEEN;
    case 13: return AEXPR_BETWEEN_SYM;
    case 14: return AEXPR_NOT_BETWEEN_SYM;
  }
  Assert(false);
  return AEXPR_OP;
}

static RoleSpecType
_intToEnumRoleSpecType(int value) {
  switch(value) {
    case 1: return ROLESPEC_CSTRING;
    case 2: return ROLESPEC_CURRENT_ROLE;
    case 3: return ROLESPEC_CURRENT_USER;
    case 4: return ROLESPEC_SESSION_USER;
    case 5: return ROLESPEC_PUBLIC;
  }
  Assert(false);
  return ROLESPEC_CSTRING;
}

static TableLikeOption
_intToEnumTableLikeOption(int value) {
  switch(value) {
    case 1: return CREATE_TABLE_LIKE_COMMENTS;
    case 2: return CREATE_TABLE_LIKE_COMPRESSION;
    case 3: return CREATE_TABLE_LIKE_CONSTRAINTS;
    case 4: return CREATE_TABLE_LIKE_DEFAULTS;
    case 5: return CREATE_TABLE_LIKE_GENERATED;
    case 6: return CREATE_TABLE_LIKE_IDENTITY;
    case 7: return CREATE_TABLE_LIKE_INDEXES;
    case 8: return CREATE_TABLE_LIKE_STATISTICS;
    case 9: return CREATE_TABLE_LIKE_STORAGE;
    case 10: return CREATE_TABLE_LIKE_ALL;
  }
  Assert(false);
  return CREATE_TABLE_LIKE_COMMENTS;
}

static DefElemAction
_intToEnumDefElemAction(int value) {
  switch(value) {
    case 1: return DEFELEM_UNSPEC;
    case 2: return DEFELEM_SET;
    case 3: return DEFELEM_ADD;
    case 4: return DEFELEM_DROP;
  }
  Assert(false);
  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) {
    case 1: return PARTITION_RANGE_DATUM_MINVALUE;
    case 2: return PARTITION_RANGE_DATUM_VALUE;
    case 3: return PARTITION_RANGE_DATUM_MAXVALUE;
  }
  Assert(false);
  return PARTITION_RANGE_DATUM_MINVALUE;
}

static RTEKind
_intToEnumRTEKind(int value) {
  switch(value) {
    case 1: return RTE_RELATION;
    case 2: return RTE_SUBQUERY;
    case 3: return RTE_JOIN;
    case 4: return RTE_FUNCTION;
    case 5: return RTE_TABLEFUNC;
    case 6: return RTE_VALUES;
    case 7: return RTE_CTE;
    case 8: return RTE_NAMEDTUPLESTORE;
    case 9: return RTE_RESULT;
  }
  Assert(false);
  return RTE_RELATION;
}

static WCOKind
_intToEnumWCOKind(int value) {
  switch(value) {
    case 1: return WCO_VIEW_CHECK;
    case 2: return WCO_RLS_INSERT_CHECK;
    case 3: return WCO_RLS_UPDATE_CHECK;
    case 4: return WCO_RLS_CONFLICT_CHECK;
    case 5: return WCO_RLS_MERGE_UPDATE_CHECK;
    case 6: return WCO_RLS_MERGE_DELETE_CHECK;
  }
  Assert(false);
  return WCO_VIEW_CHECK;
}

static GroupingSetKind
_intToEnumGroupingSetKind(int value) {
  switch(value) {
    case 1: return GROUPING_SET_EMPTY;
    case 2: return GROUPING_SET_SIMPLE;
    case 3: return GROUPING_SET_ROLLUP;
    case 4: return GROUPING_SET_CUBE;
    case 5: return GROUPING_SET_SETS;
  }
  Assert(false);
  return GROUPING_SET_EMPTY;
}

static CTEMaterialize
_intToEnumCTEMaterialize(int value) {
  switch(value) {
    case 1: return CTEMaterializeDefault;
    case 2: return CTEMaterializeAlways;
    case 3: return CTEMaterializeNever;
  }
  Assert(false);
  return CTEMaterializeDefault;
}

static JsonQuotes
_intToEnumJsonQuotes(int value) {
  switch(value) {
    case 1: return JS_QUOTES_UNSPEC;
    case 2: return JS_QUOTES_KEEP;
    case 3: return JS_QUOTES_OMIT;
  }
  Assert(false);
  return JS_QUOTES_UNSPEC;
}

static JsonTableColumnType
_intToEnumJsonTableColumnType(int value) {
  switch(value) {
    case 1: return JTC_FOR_ORDINALITY;
    case 2: return JTC_REGULAR;
    case 3: return JTC_EXISTS;
    case 4: return JTC_FORMATTED;
    case 5: return JTC_NESTED;
  }
  Assert(false);
  return JTC_FOR_ORDINALITY;
}

static SetOperation
_intToEnumSetOperation(int value) {
  switch(value) {
    case 1: return SETOP_NONE;
    case 2: return SETOP_UNION;
    case 3: return SETOP_INTERSECT;
    case 4: return SETOP_EXCEPT;
  }
  Assert(false);
  return SETOP_NONE;
}

static ObjectType
_intToEnumObjectType(int value) {
  switch(value) {
    case 1: return OBJECT_ACCESS_METHOD;
    case 2: return OBJECT_AGGREGATE;
    case 3: return OBJECT_AMOP;
    case 4: return OBJECT_AMPROC;
    case 5: return OBJECT_ATTRIBUTE;
    case 6: return OBJECT_CAST;
    case 7: return OBJECT_COLUMN;
    case 8: return OBJECT_COLLATION;
    case 9: return OBJECT_CONVERSION;
    case 10: return OBJECT_DATABASE;
    case 11: return OBJECT_DEFAULT;
    case 12: return OBJECT_DEFACL;
    case 13: return OBJECT_DOMAIN;
    case 14: return OBJECT_DOMCONSTRAINT;
    case 15: return OBJECT_EVENT_TRIGGER;
    case 16: return OBJECT_EXTENSION;
    case 17: return OBJECT_FDW;
    case 18: return OBJECT_FOREIGN_SERVER;
    case 19: return OBJECT_FOREIGN_TABLE;
    case 20: return OBJECT_FUNCTION;
    case 21: return OBJECT_INDEX;
    case 22: return OBJECT_LANGUAGE;
    case 23: return OBJECT_LARGEOBJECT;
    case 24: return OBJECT_MATVIEW;
    case 25: return OBJECT_OPCLASS;
    case 26: return OBJECT_OPERATOR;
    case 27: return OBJECT_OPFAMILY;
    case 28: return OBJECT_PARAMETER_ACL;
    case 29: return OBJECT_POLICY;
    case 30: return OBJECT_PROCEDURE;
    case 31: return OBJECT_PUBLICATION;
    case 32: return OBJECT_PUBLICATION_NAMESPACE;
    case 33: return OBJECT_PUBLICATION_REL;
    case 34: return OBJECT_ROLE;
    case 35: return OBJECT_ROUTINE;
    case 36: return OBJECT_RULE;
    case 37: return OBJECT_SCHEMA;
    case 38: return OBJECT_SEQUENCE;
    case 39: return OBJECT_SUBSCRIPTION;
    case 40: return OBJECT_STATISTIC_EXT;
    case 41: return OBJECT_TABCONSTRAINT;
    case 42: return OBJECT_TABLE;
    case 43: return OBJECT_TABLESPACE;
    case 44: return OBJECT_TRANSFORM;
    case 45: return OBJECT_TRIGGER;
    case 46: return OBJECT_TSCONFIGURATION;
    case 47: return OBJECT_TSDICTIONARY;
    case 48: return OBJECT_TSPARSER;
    case 49: return OBJECT_TSTEMPLATE;
    case 50: return OBJECT_TYPE;
    case 51: return OBJECT_USER_MAPPING;
    case 52: return OBJECT_VIEW;
  }
  Assert(false);
  return OBJECT_ACCESS_METHOD;
}

static DropBehavior
_intToEnumDropBehavior(int value) {
  switch(value) {
    case 1: return DROP_RESTRICT;
    case 2: return DROP_CASCADE;
  }
  Assert(false);
  return DROP_RESTRICT;
}

static AlterTableType
_intToEnumAlterTableType(int value) {
  switch(value) {
    case 1: return AT_AddColumn;
    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_SetExpression;
    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_AddIndex;
    case 17: return AT_ReAddIndex;
    case 18: return AT_AddConstraint;
    case 19: return AT_ReAddConstraint;
    case 20: return AT_ReAddDomainConstraint;
    case 21: return AT_AlterConstraint;
    case 22: return AT_ValidateConstraint;
    case 23: return AT_AddIndexConstraint;
    case 24: return AT_DropConstraint;
    case 25: return AT_ReAddComment;
    case 26: return AT_AlterColumnType;
    case 27: return AT_AlterColumnGenericOptions;
    case 28: return AT_ChangeOwner;
    case 29: return AT_ClusterOn;
    case 30: return AT_DropCluster;
    case 31: return AT_SetLogged;
    case 32: return AT_SetUnLogged;
    case 33: return AT_DropOids;
    case 34: return AT_SetAccessMethod;
    case 35: return AT_SetTableSpace;
    case 36: return AT_SetRelOptions;
    case 37: return AT_ResetRelOptions;
    case 38: return AT_ReplaceRelOptions;
    case 39: return AT_EnableTrig;
    case 40: return AT_EnableAlwaysTrig;
    case 41: return AT_EnableReplicaTrig;
    case 42: return AT_DisableTrig;
    case 43: return AT_EnableTrigAll;
    case 44: return AT_DisableTrigAll;
    case 45: return AT_EnableTrigUser;
    case 46: return AT_DisableTrigUser;
    case 47: return AT_EnableRule;
    case 48: return AT_EnableAlwaysRule;
    case 49: return AT_EnableReplicaRule;
    case 50: return AT_DisableRule;
    case 51: return AT_AddInherit;
    case 52: return AT_DropInherit;
    case 53: return AT_AddOf;
    case 54: return AT_DropOf;
    case 55: return AT_ReplicaIdentity;
    case 56: return AT_EnableRowSecurity;
    case 57: return AT_DisableRowSecurity;
    case 58: return AT_ForceRowSecurity;
    case 59: return AT_NoForceRowSecurity;
    case 60: return AT_GenericOptions;
    case 61: return AT_AttachPartition;
    case 62: return AT_DetachPartition;
    case 63: return AT_DetachPartitionFinalize;
    case 64: return AT_AddIdentity;
    case 65: return AT_SetIdentity;
    case 66: return AT_DropIdentity;
    case 67: return AT_ReAddStatistics;
  }
  Assert(false);
  return AT_AddColumn;
}

static GrantTargetType
_intToEnumGrantTargetType(int value) {
  switch(value) {
    case 1: return ACL_TARGET_OBJECT;
    case 2: return ACL_TARGET_ALL_IN_SCHEMA;
    case 3: return ACL_TARGET_DEFAULTS;
  }
  Assert(false);
  return ACL_TARGET_OBJECT;
}

static VariableSetKind
_intToEnumVariableSetKind(int value) {
  switch(value) {
    case 1: return VAR_SET_VALUE;
    case 2: return VAR_SET_DEFAULT;
    case 3: return VAR_SET_CURRENT;
    case 4: return VAR_SET_MULTI;
    case 5: return VAR_RESET;
    case 6: return VAR_RESET_ALL;
  }
  Assert(false);
  return VAR_SET_VALUE;
}

static ConstrType
_intToEnumConstrType(int value) {
  switch(value) {
    case 1: return CONSTR_NULL;
    case 2: return CONSTR_NOTNULL;
    case 3: return CONSTR_DEFAULT;
    case 4: return CONSTR_IDENTITY;
    case 5: return CONSTR_GENERATED;
    case 6: return CONSTR_CHECK;
    case 7: return CONSTR_PRIMARY;
    case 8: return CONSTR_UNIQUE;
    case 9: return CONSTR_EXCLUSION;
    case 10: return CONSTR_FOREIGN;
    case 11: return CONSTR_ATTR_DEFERRABLE;
    case 12: return CONSTR_ATTR_NOT_DEFERRABLE;
    case 13: return CONSTR_ATTR_DEFERRED;
    case 14: return CONSTR_ATTR_IMMEDIATE;
  }
  Assert(false);
  return CONSTR_NULL;
}

static ImportForeignSchemaType
_intToEnumImportForeignSchemaType(int value) {
  switch(value) {
    case 1: return FDW_IMPORT_SCHEMA_ALL;
    case 2: return FDW_IMPORT_SCHEMA_LIMIT_TO;
    case 3: return FDW_IMPORT_SCHEMA_EXCEPT;
  }
  Assert(false);
  return FDW_IMPORT_SCHEMA_ALL;
}

static RoleStmtType
_intToEnumRoleStmtType(int value) {
  switch(value) {
    case 1: return ROLESTMT_ROLE;
    case 2: return ROLESTMT_USER;
    case 3: return ROLESTMT_GROUP;
  }
  Assert(false);
  return ROLESTMT_ROLE;
}

static FetchDirection
_intToEnumFetchDirection(int value) {
  switch(value) {
    case 1: return FETCH_FORWARD;
    case 2: return FETCH_BACKWARD;
    case 3: return FETCH_ABSOLUTE;
    case 4: return FETCH_RELATIVE;
  }
  Assert(false);
  return FETCH_FORWARD;
}

static FunctionParameterMode
_intToEnumFunctionParameterMode(int value) {
  switch(value) {
    case 1: return FUNC_PARAM_IN;
    case 2: return FUNC_PARAM_OUT;
    case 3: return FUNC_PARAM_INOUT;
    case 4: return FUNC_PARAM_VARIADIC;
    case 5: return FUNC_PARAM_TABLE;
    case 6: return FUNC_PARAM_DEFAULT;
  }
  Assert(false);
  return FUNC_PARAM_IN;
}

static TransactionStmtKind
_intToEnumTransactionStmtKind(int value) {
  switch(value) {
    case 1: return TRANS_STMT_BEGIN;
    case 2: return TRANS_STMT_START;
    case 3: return TRANS_STMT_COMMIT;
    case 4: return TRANS_STMT_ROLLBACK;
    case 5: return TRANS_STMT_SAVEPOINT;
    case 6: return TRANS_STMT_RELEASE;
    case 7: return TRANS_STMT_ROLLBACK_TO;
    case 8: return TRANS_STMT_PREPARE;
    case 9: return TRANS_STMT_COMMIT_PREPARED;
    case 10: return TRANS_STMT_ROLLBACK_PREPARED;
  }
  Assert(false);
  return TRANS_STMT_BEGIN;
}

static ViewCheckOption
_intToEnumViewCheckOption(int value) {
  switch(value) {
    case 1: return NO_CHECK_OPTION;
    case 2: return LOCAL_CHECK_OPTION;
    case 3: return CASCADED_CHECK_OPTION;
  }
  Assert(false);
  return NO_CHECK_OPTION;
}

static DiscardMode
_intToEnumDiscardMode(int value) {
  switch(value) {
    case 1: return DISCARD_ALL;
    case 2: return DISCARD_PLANS;
    case 3: return DISCARD_SEQUENCES;
    case 4: return DISCARD_TEMP;
  }
  Assert(false);
  return DISCARD_ALL;
}

static ReindexObjectType
_intToEnumReindexObjectType(int value) {
  switch(value) {
    case 1: return REINDEX_OBJECT_INDEX;
    case 2: return REINDEX_OBJECT_TABLE;
    case 3: return REINDEX_OBJECT_SCHEMA;
    case 4: return REINDEX_OBJECT_SYSTEM;
    case 5: return REINDEX_OBJECT_DATABASE;
  }
  Assert(false);
  return REINDEX_OBJECT_INDEX;
}

static AlterTSConfigType
_intToEnumAlterTSConfigType(int value) {
  switch(value) {
    case 1: return ALTER_TSCONFIG_ADD_MAPPING;
    case 2: return ALTER_TSCONFIG_ALTER_MAPPING_FOR_TOKEN;
    case 3: return ALTER_TSCONFIG_REPLACE_DICT;
    case 4: return ALTER_TSCONFIG_REPLACE_DICT_FOR_TOKEN;
    case 5: return ALTER_TSCONFIG_DROP_MAPPING;
  }
  Assert(false);
  return ALTER_TSCONFIG_ADD_MAPPING;
}

static PublicationObjSpecType
_intToEnumPublicationObjSpecType(int value) {
  switch(value) {
    case 1: return PUBLICATIONOBJ_TABLE;
    case 2: return PUBLICATIONOBJ_TABLES_IN_SCHEMA;
    case 3: return PUBLICATIONOBJ_TABLES_IN_CUR_SCHEMA;
    case 4: return PUBLICATIONOBJ_CONTINUATION;
  }
  Assert(false);
  return PUBLICATIONOBJ_TABLE;
}

static AlterPublicationAction
_intToEnumAlterPublicationAction(int value) {
  switch(value) {
    case 1: return AP_AddObjects;
    case 2: return AP_DropObjects;
    case 3: return AP_SetObjects;
  }
  Assert(false);
  return AP_AddObjects;
}

static AlterSubscriptionType
_intToEnumAlterSubscriptionType(int value) {
  switch(value) {
    case 1: return ALTER_SUBSCRIPTION_OPTIONS;
    case 2: return ALTER_SUBSCRIPTION_CONNECTION;
    case 3: return ALTER_SUBSCRIPTION_SET_PUBLICATION;
    case 4: return ALTER_SUBSCRIPTION_ADD_PUBLICATION;
    case 5: return ALTER_SUBSCRIPTION_DROP_PUBLICATION;
    case 6: return ALTER_SUBSCRIPTION_REFRESH;
    case 7: return ALTER_SUBSCRIPTION_ENABLED;
    case 8: return ALTER_SUBSCRIPTION_SKIP;
  }
  Assert(false);
  return ALTER_SUBSCRIPTION_OPTIONS;
}

static OverridingKind
_intToEnumOverridingKind(int value) {
  switch(value) {
    case 1: return OVERRIDING_NOT_SET;
    case 2: return OVERRIDING_USER_VALUE;
    case 3: return OVERRIDING_SYSTEM_VALUE;
  }
  Assert(false);
  return OVERRIDING_NOT_SET;
}

static OnCommitAction
_intToEnumOnCommitAction(int value) {
  switch(value) {
    case 1: return ONCOMMIT_NOOP;
    case 2: return ONCOMMIT_PRESERVE_ROWS;
    case 3: return ONCOMMIT_DELETE_ROWS;
    case 4: return ONCOMMIT_DROP;
  }
  Assert(false);
  return ONCOMMIT_NOOP;
}

static TableFuncType
_intToEnumTableFuncType(int value) {
  switch(value) {
    case 1: return TFT_XMLTABLE;
    case 2: return TFT_JSON_TABLE;
  }
  Assert(false);
  return TFT_XMLTABLE;
}

static ParamKind
_intToEnumParamKind(int value) {
  switch(value) {
    case 1: return PARAM_EXTERN;
    case 2: return PARAM_EXEC;
    case 3: return PARAM_SUBLINK;
    case 4: return PARAM_MULTIEXPR;
  }
  Assert(false);
  return PARAM_EXTERN;
}

static CoercionContext
_intToEnumCoercionContext(int value) {
  switch(value) {
    case 1: return COERCION_IMPLICIT;
    case 2: return COERCION_ASSIGNMENT;
    case 3: return COERCION_PLPGSQL;
    case 4: return COERCION_EXPLICIT;
  }
  Assert(false);
  return COERCION_IMPLICIT;
}

static CoercionForm
_intToEnumCoercionForm(int value) {
  switch(value) {
    case 1: return COERCE_EXPLICIT_CALL;
    case 2: return COERCE_EXPLICIT_CAST;
    case 3: return COERCE_IMPLICIT_CAST;
    case 4: return COERCE_SQL_SYNTAX;
  }
  Assert(false);
  return COERCE_EXPLICIT_CALL;
}

static BoolExprType
_intToEnumBoolExprType(int value) {
  switch(value) {
    case 1: return AND_EXPR;
    case 2: return OR_EXPR;
    case 3: return NOT_EXPR;
  }
  Assert(false);
  return AND_EXPR;
}

static SubLinkType
_intToEnumSubLinkType(int value) {
  switch(value) {
    case 1: return EXISTS_SUBLINK;
    case 2: return ALL_SUBLINK;
    case 3: return ANY_SUBLINK;
    case 4: return ROWCOMPARE_SUBLINK;
    case 5: return EXPR_SUBLINK;
    case 6: return MULTIEXPR_SUBLINK;
    case 7: return ARRAY_SUBLINK;
    case 8: return CTE_SUBLINK;
  }
  Assert(false);
  return EXISTS_SUBLINK;
}

static RowCompareType
_intToEnumRowCompareType(int value) {
  switch(value) {
    case 1: return ROWCOMPARE_LT;
    case 2: return ROWCOMPARE_LE;
    case 3: return ROWCOMPARE_EQ;
    case 4: return ROWCOMPARE_GE;
    case 5: return ROWCOMPARE_GT;
    case 6: return ROWCOMPARE_NE;
  }
  Assert(false);
  return ROWCOMPARE_LT;
}

static MinMaxOp
_intToEnumMinMaxOp(int value) {
  switch(value) {
    case 1: return IS_GREATEST;
    case 2: return IS_LEAST;
  }
  Assert(false);
  return IS_GREATEST;
}

static SQLValueFunctionOp
_intToEnumSQLValueFunctionOp(int value) {
  switch(value) {
    case 1: return SVFOP_CURRENT_DATE;
    case 2: return SVFOP_CURRENT_TIME;
    case 3: return SVFOP_CURRENT_TIME_N;
    case 4: return SVFOP_CURRENT_TIMESTAMP;
    case 5: return SVFOP_CURRENT_TIMESTAMP_N;
    case 6: return SVFOP_LOCALTIME;
    case 7: return SVFOP_LOCALTIME_N;
    case 8: return SVFOP_LOCALTIMESTAMP;
    case 9: return SVFOP_LOCALTIMESTAMP_N;
    case 10: return SVFOP_CURRENT_ROLE;
    case 11: return SVFOP_CURRENT_USER;
    case 12: return SVFOP_USER;
    case 13: return SVFOP_SESSION_USER;
    case 14: return SVFOP_CURRENT_CATALOG;
    case 15: return SVFOP_CURRENT_SCHEMA;
  }
  Assert(false);
  return SVFOP_CURRENT_DATE;
}

static XmlExprOp
_intToEnumXmlExprOp(int value) {
  switch(value) {
    case 1: return IS_XMLCONCAT;
    case 2: return IS_XMLELEMENT;
    case 3: return IS_XMLFOREST;
    case 4: return IS_XMLPARSE;
    case 5: return IS_XMLPI;
    case 6: return IS_XMLROOT;
    case 7: return IS_XMLSERIALIZE;
    case 8: return IS_DOCUMENT;
  }
  Assert(false);
  return IS_XMLCONCAT;
}

static XmlOptionType
_intToEnumXmlOptionType(int value) {
  switch(value) {
    case 1: return XMLOPTION_DOCUMENT;
    case 2: return XMLOPTION_CONTENT;
  }
  Assert(false);
  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;
    case 5: return JSCTOR_JSON_PARSE;
    case 6: return JSCTOR_JSON_SCALAR;
    case 7: return JSCTOR_JSON_SERIALIZE;
  }
  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 JsonWrapper
_intToEnumJsonWrapper(int value) {
  switch(value) {
    case 1: return JSW_UNSPEC;
    case 2: return JSW_NONE;
    case 3: return JSW_CONDITIONAL;
    case 4: return JSW_UNCONDITIONAL;
  }
  Assert(false);
  return JSW_UNSPEC;
}

static JsonBehaviorType
_intToEnumJsonBehaviorType(int value) {
  switch(value) {
    case 1: return JSON_BEHAVIOR_NULL;
    case 2: return JSON_BEHAVIOR_ERROR;
    case 3: return JSON_BEHAVIOR_EMPTY;
    case 4: return JSON_BEHAVIOR_TRUE;
    case 5: return JSON_BEHAVIOR_FALSE;
    case 6: return JSON_BEHAVIOR_UNKNOWN;
    case 7: return JSON_BEHAVIOR_EMPTY_ARRAY;
    case 8: return JSON_BEHAVIOR_EMPTY_OBJECT;
    case 9: return JSON_BEHAVIOR_DEFAULT;
  }
  Assert(false);
  return JSON_BEHAVIOR_NULL;
}

static JsonExprOp
_intToEnumJsonExprOp(int value) {
  switch(value) {
    case 1: return JSON_EXISTS_OP;
    case 2: return JSON_QUERY_OP;
    case 3: return JSON_VALUE_OP;
    case 4: return JSON_TABLE_OP;
  }
  Assert(false);
  return JSON_EXISTS_OP;
}

static NullTestType
_intToEnumNullTestType(int value) {
  switch(value) {
    case 1: return IS_NULL;
    case 2: return IS_NOT_NULL;
  }
  Assert(false);
  return IS_NULL;
}

static BoolTestType
_intToEnumBoolTestType(int value) {
  switch(value) {
    case 1: return IS_TRUE;
    case 2: return IS_NOT_TRUE;
    case 3: return IS_FALSE;
    case 4: return IS_NOT_FALSE;
    case 5: return IS_UNKNOWN;
    case 6: return IS_NOT_UNKNOWN;
  }
  Assert(false);
  return IS_TRUE;
}

static MergeMatchKind
_intToEnumMergeMatchKind(int value) {
  switch(value) {
    case 1: return MERGE_WHEN_MATCHED;
    case 2: return MERGE_WHEN_NOT_MATCHED_BY_SOURCE;
    case 3: return MERGE_WHEN_NOT_MATCHED_BY_TARGET;
  }
  Assert(false);
  return MERGE_WHEN_MATCHED;
}

static CmdType
_intToEnumCmdType(int value) {
  switch(value) {
    case 1: return CMD_UNKNOWN;
    case 2: return CMD_SELECT;
    case 3: return CMD_UPDATE;
    case 4: return CMD_INSERT;
    case 5: return CMD_DELETE;
    case 6: return CMD_MERGE;
    case 7: return CMD_UTILITY;
    case 8: return CMD_NOTHING;
  }
  Assert(false);
  return CMD_UNKNOWN;
}

static JoinType
_intToEnumJoinType(int value) {
  switch(value) {
    case 1: return JOIN_INNER;
    case 2: return JOIN_LEFT;
    case 3: return JOIN_FULL;
    case 4: return JOIN_RIGHT;
    case 5: return JOIN_SEMI;
    case 6: return JOIN_ANTI;
    case 7: return JOIN_RIGHT_ANTI;
    case 8: return JOIN_UNIQUE_OUTER;
    case 9: return JOIN_UNIQUE_INNER;
  }
  Assert(false);
  return JOIN_INNER;
}

static AggStrategy
_intToEnumAggStrategy(int value) {
  switch(value) {
    case 1: return AGG_PLAIN;
    case 2: return AGG_SORTED;
    case 3: return AGG_HASHED;
    case 4: return AGG_MIXED;
  }
  Assert(false);
  return AGG_PLAIN;
}

static AggSplit
_intToEnumAggSplit(int value) {
  switch(value) {
    case 1: return AGGSPLIT_SIMPLE;
    case 2: return AGGSPLIT_INITIAL_SERIAL;
    case 3: return AGGSPLIT_FINAL_DESERIAL;
  }
  Assert(false);
  return AGGSPLIT_SIMPLE;
}

static SetOpCmd
_intToEnumSetOpCmd(int value) {
  switch(value) {
    case 1: return SETOPCMD_INTERSECT;
    case 2: return SETOPCMD_INTERSECT_ALL;
    case 3: return SETOPCMD_EXCEPT;
    case 4: return SETOPCMD_EXCEPT_ALL;
  }
  Assert(false);
  return SETOPCMD_INTERSECT;
}

static SetOpStrategy
_intToEnumSetOpStrategy(int value) {
  switch(value) {
    case 1: return SETOP_SORTED;
    case 2: return SETOP_HASHED;
  }
  Assert(false);
  return SETOP_SORTED;
}

static OnConflictAction
_intToEnumOnConflictAction(int value) {
  switch(value) {
    case 1: return ONCONFLICT_NONE;
    case 2: return ONCONFLICT_NOTHING;
    case 3: return ONCONFLICT_UPDATE;
  }
  Assert(false);
  return ONCONFLICT_NONE;
}

static LimitOption
_intToEnumLimitOption(int value) {
  switch(value) {
    case 1: return LIMIT_OPTION_DEFAULT;
    case 2: return LIMIT_OPTION_COUNT;
    case 3: return LIMIT_OPTION_WITH_TIES;
  }
  Assert(false);
  return LIMIT_OPTION_DEFAULT;
}

static LockClauseStrength
_intToEnumLockClauseStrength(int value) {
  switch(value) {
    case 1: return LCS_NONE;
    case 2: return LCS_FORKEYSHARE;
    case 3: return LCS_FORSHARE;
    case 4: return LCS_FORNOKEYUPDATE;
    case 5: return LCS_FORUPDATE;
  }
  Assert(false);
  return LCS_NONE;
}

static LockWaitPolicy
_intToEnumLockWaitPolicy(int value) {
  switch(value) {
    case 1: return LockWaitBlock;
    case 2: return LockWaitSkip;
    case 3: return LockWaitError;
  }
  Assert(false);
  return LockWaitBlock;
}

static LockTupleMode
_intToEnumLockTupleMode(int value) {
  switch(value) {
    case 1: return LockTupleKeyShare;
    case 2: return LockTupleShare;
    case 3: return LockTupleNoKeyExclusive;
    case 4: return LockTupleExclusive;
  }
  Assert(false);
  return LockTupleKeyShare;
}