mirror of https://github.com/jackc/pgx.git
Merge pull request #581 from damour/fix_user_defined_array_type
Load user-defined array type oids.pull/556/head^2
commit
c32f905920
4
conn.go
4
conn.go
|
@ -611,12 +611,14 @@ func initPostgresql(c *Conn) (*pgtype.ConnInfo, error) {
|
|||
end
|
||||
from pg_type t
|
||||
left join pg_type base_type on t.typelem=base_type.oid
|
||||
left join pg_class base_cls ON base_type.typrelid = base_cls.oid
|
||||
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')
|
||||
and (base_cls.oid is null or base_cls.relkind = 'c')
|
||||
)`
|
||||
)
|
||||
|
||||
|
|
|
@ -210,12 +210,14 @@ func PgxInitSteps() []Step {
|
|||
end
|
||||
from pg_type t
|
||||
left join pg_type base_type on t.typelem=base_type.oid
|
||||
left join pg_class base_cls ON base_type.typrelid = base_cls.oid
|
||||
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')
|
||||
and (base_cls.oid is null or base_cls.relkind = 'c')
|
||||
)`,
|
||||
}),
|
||||
ExpectMessage(&pgproto3.Describe{
|
||||
|
|
Loading…
Reference in New Issue