Merge branch 'j16r-shrink_pg_type_query_on_connect'

pull/141/head
Jack Christensen 2016-05-10 16:30:11 -05:00
commit d9fb1351fb
1 changed files with 1 additions and 1 deletions

View File

@ -303,7 +303,7 @@ func (c *Conn) connect(config ConnConfig, network, address string, tlsConfig *tl
}
func (c *Conn) loadPgTypes() error {
rows, err := c.Query("select t.oid, t.typname from pg_type t where t.typtype='b'")
rows, err := c.Query("select t.oid, t.typname from pg_type t left join pg_type base_type on t.typelem=base_type.oid where t.typtype='b' and (base_type.oid is null or base_type.typtype='b');")
if err != nil {
return err
}