class PgEncodingToCharFunction extends Scalar<String, Integer> {

    private static final FunctionName FQN = new FunctionName(PgCatalogSchemaInfo.NAME, "pg_encoding_to_char");

    public static void register(Functions.Builder module) {
        module.add(
            scalar(
                FQN,
                DataTypes.INTEGER.getTypeSignature(),
                DataTypes.STRING.getTypeSignature()
            ).withFeature(Feature.NON_NULLABLE),
            PgEncodingToCharFunction:: new
        );
    }

    public PgEncodingToCharFunction(Signature signature, BoundSignature boundSignature) {
        super(signature, boundSignature);
    }

    @SafeVarargs
    @Override
    public final String evaluate(TransactionContext txnCtx, NodeContext nodeContext, Input<Integer>... args) {<FILL_FUNCTION_BODY>}

    private enum PgEncodingIdentifiers {
        // See https://github.com/postgres/postgres/blob/master/src/include/mb/pg_wchar.h
        SQL_ASCII,
        EUC_JP,
        EUC_CN,
        EUC_KR,
        EUC_TW,
        EUC_JIS_2004,
        UTF8,
        MULE_INTERNAL,
        LATIN1,
        LATIN2,
        LATIN3,
        LATIN4,
        LATIN5,
        LATIN6,
        LATIN7,
        LATIN8,
        LATIN9,
        LATIN10,
        WIN1256,
        WIN1258,
        WIN866,
        WIN874,
        KOI8R,
        WIN1251,
        WIN1252,
        ISO_8859_5,
        ISO_8859_6,
        ISO_8859_7,
        ISO_8859_8,
        WIN1250,
        WIN1253,
        WIN1254,
        WIN1255,
        WIN1257,
        KOI8U,
        SJIS,
        BIG5,
        GBK,
        UHC,
        GB18030,
        JOHAB,
        SHIFT_JIS_2004;
    }
}

        var value = args[0].value();
        if (value == null || value < 0 || value >= PgEncodingIdentifiers.values().length) {
            return null;
        }
        return PgEncodingIdentifiers.values()[value].name();
    
<methods>public BoundSignature boundSignature() ,public Scalar<java.lang.String,java.lang.Integer> compile(List<io.crate.expression.symbol.Symbol>, java.lang.String, io.crate.role.Roles) ,public transient abstract java.lang.String evaluate(io.crate.metadata.TransactionContext, io.crate.metadata.NodeContext, Input<java.lang.Integer>[]) ,public io.crate.expression.symbol.Symbol normalizeSymbol(io.crate.expression.symbol.Function, io.crate.metadata.TransactionContext, io.crate.metadata.NodeContext) ,public io.crate.metadata.functions.Signature signature() <variables>public static final Set<io.crate.metadata.Scalar.Feature> DETERMINISTIC_AND_COMPARISON_REPLACEMENT,public static final Set<io.crate.metadata.Scalar.Feature> DETERMINISTIC_ONLY,public static final Set<io.crate.metadata.Scalar.Feature> NO_FEATURES,protected final non-sealed BoundSignature boundSignature,protected final non-sealed io.crate.metadata.functions.Signature signature