From 24af09455e8d281c57705bcbc9189eddbfbb8ed1 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Thu, 15 Feb 2024 15:22:54 +0100 Subject: [PATCH] Do not require typarray column when auto-registering extensions. [resolves #632] --- .../java/io/r2dbc/postgresql/codec/BuiltinDynamicCodecs.java | 2 +- src/main/java/io/r2dbc/postgresql/codec/PostgresTypes.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/r2dbc/postgresql/codec/BuiltinDynamicCodecs.java b/src/main/java/io/r2dbc/postgresql/codec/BuiltinDynamicCodecs.java index 80131c8b..2cce4e03 100644 --- a/src/main/java/io/r2dbc/postgresql/codec/BuiltinDynamicCodecs.java +++ b/src/main/java/io/r2dbc/postgresql/codec/BuiltinDynamicCodecs.java @@ -119,7 +119,7 @@ public Publisher register(PostgresqlConnection connection, ByteBufAllocato } private PostgresqlStatement createQuery(PostgresqlConnection connection) { - return connection.createStatement(String.format("SELECT oid, typname, typarray FROM pg_catalog.pg_type WHERE typname IN (%s)", getPlaceholders())); + return connection.createStatement(String.format("SELECT * FROM pg_catalog.pg_type WHERE typname IN (%s)", getPlaceholders())); } private static String getPlaceholders() { diff --git a/src/main/java/io/r2dbc/postgresql/codec/PostgresTypes.java b/src/main/java/io/r2dbc/postgresql/codec/PostgresTypes.java index 5ded9b6e..e33c8bfb 100644 --- a/src/main/java/io/r2dbc/postgresql/codec/PostgresTypes.java +++ b/src/main/java/io/r2dbc/postgresql/codec/PostgresTypes.java @@ -40,7 +40,7 @@ public class PostgresTypes { public final static int NO_SUCH_TYPE = -1; // parameterized with %s for the comparator (=, IN), %s for the actual criteria value and %s for a potential LIMIT 1 statement - private static final String SELECT_PG_TYPE = "SELECT pg_type.oid, typarray, typname, typcategory " + private static final String SELECT_PG_TYPE = "SELECT pg_type.* " + " FROM pg_catalog.pg_type " + " LEFT " + " JOIN (select ns.oid as nspoid, ns.nspname, r.r "