From 7829081b8c1eebc860dab63378b60eb47456bea2 Mon Sep 17 00:00:00 2001 From: Dmitriy Garanzha Date: Fri, 16 Aug 2019 13:22:16 +0300 Subject: [PATCH] Load user-defined array type oids. --- conn.go | 2 +- pgmock/pgmock.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conn.go b/conn.go index 121297b8..9dc4cdbf 100644 --- a/conn.go +++ b/conn.go @@ -615,7 +615,7 @@ left join pg_namespace nsp on t.typnamespace=nsp.oid left join pg_class cls on t.typrelid=cls.oid where ( t.typtype in('b', 'p', 'r', 'e', 'c') - and (base_type.oid is null or base_type.typtype in('b', 'p', 'r')) + and (base_type.oid is null or base_type.typtype in('b', 'p', 'r', 'c')) and (cls.oid is null or cls.relkind='c') )` ) diff --git a/pgmock/pgmock.go b/pgmock/pgmock.go index d4ab0d13..5c3fdc27 100644 --- a/pgmock/pgmock.go +++ b/pgmock/pgmock.go @@ -214,7 +214,7 @@ left join pg_namespace nsp on t.typnamespace=nsp.oid left join pg_class cls on t.typrelid=cls.oid where ( t.typtype in('b', 'p', 'r', 'e', 'c') - and (base_type.oid is null or base_type.typtype in('b', 'p', 'r')) + and (base_type.oid is null or base_type.typtype in('b', 'p', 'r', 'c')) and (cls.oid is null or cls.relkind='c') )`, }),