2
0

Merge pull request #549 from dntj/master

Read OIDs for composite types on connection init.
This commit is contained in:
Jack Christensen
2019-06-28 16:53:37 -04:00
committed by GitHub
2 changed files with 6 additions and 2 deletions
+3 -1
View File
@@ -404,9 +404,11 @@ func initPostgresql(c *Conn) (*pgtype.ConnInfo, error) {
from pg_type t from pg_type t
left join pg_type base_type on t.typelem=base_type.oid left join pg_type base_type on t.typelem=base_type.oid
left join pg_namespace nsp on t.typnamespace=nsp.oid left join pg_namespace nsp on t.typnamespace=nsp.oid
left join pg_class cls on t.typrelid=cls.oid
where ( where (
t.typtype in('b', 'p', 'r', 'e') 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'))
and (cls.oid is null or cls.relkind='c')
)` )`
) )
+3 -1
View File
@@ -211,9 +211,11 @@ func PgxInitSteps() []Step {
from pg_type t from pg_type t
left join pg_type base_type on t.typelem=base_type.oid left join pg_type base_type on t.typelem=base_type.oid
left join pg_namespace nsp on t.typnamespace=nsp.oid left join pg_namespace nsp on t.typnamespace=nsp.oid
left join pg_class cls on t.typrelid=cls.oid
where ( where (
t.typtype in('b', 'p', 'r', 'e') 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'))
and (cls.oid is null or cls.relkind='c')
)`, )`,
}), }),
ExpectMessage(&pgproto3.Describe{ ExpectMessage(&pgproto3.Describe{