diff --git a/src/main/java/io/r2dbc/postgresql/codec/BuiltinDynamicCodecs.java b/src/main/java/io/r2dbc/postgresql/codec/BuiltinDynamicCodecs.java index 2cce4e03..b770c531 100644 --- a/src/main/java/io/r2dbc/postgresql/codec/BuiltinDynamicCodecs.java +++ b/src/main/java/io/r2dbc/postgresql/codec/BuiltinDynamicCodecs.java @@ -104,12 +104,12 @@ public Publisher register(PostgresqlConnection connection, ByteBufAllocato return statement.execute() .flatMap(it -> it.map((row, rowMetadata) -> { - int oid = PostgresqlObjectId.toInt(row.get("oid", Long.class)); - int typarray = rowMetadata.contains("typarray") ? PostgresqlObjectId.toInt(row.get("typarray", Long.class)) : PostgresTypes.NO_SUCH_TYPE; String typname = row.get("typname", String.class); BuiltinCodec lookup = BuiltinCodec.lookup(typname); if (lookup.isSupported()) { + int oid = PostgresqlObjectId.toInt(row.get("oid", Long.class)); + int typarray = rowMetadata.contains("typarray") ? PostgresqlObjectId.toInt(row.get("typarray", Long.class)) : PostgresTypes.NO_SUCH_TYPE; lookup.createCodec(byteBufAllocator, oid, typarray).forEach(registry::addLast); }