Automatically register enum types

fixes #287
v3-ann
Jack Christensen 2017-07-04 11:36:08 -05:00
parent 3404529457
commit 53b4280456
2 changed files with 2 additions and 2 deletions

View File

@ -388,7 +388,7 @@ func (c *Conn) initConnInfo() error {
from pg_type t
left join pg_type base_type on t.typelem=base_type.oid
where (
t.typtype in('b', 'p', 'r')
t.typtype in('b', 'p', 'r', 'e')
and (base_type.oid is null or base_type.typtype in('b', 'p', 'r'))
)`)
if err != nil {

View File

@ -204,7 +204,7 @@ func AcceptUnauthenticatedConnRequestSteps() []Step {
func PgxInitSteps() []Step {
steps := []Step{
ExpectMessage(&pgproto3.Parse{
Query: "select t.oid, t.typname\nfrom pg_type t\nleft join pg_type base_type on t.typelem=base_type.oid\nwhere (\n\t t.typtype in('b', 'p', 'r')\n\t and (base_type.oid is null or base_type.typtype in('b', 'p', 'r'))\n\t)",
Query: "select t.oid, t.typname\nfrom pg_type t\nleft join pg_type base_type on t.typelem=base_type.oid\nwhere (\n\t t.typtype in('b', 'p', 'r', 'e')\n\t and (base_type.oid is null or base_type.typtype in('b', 'p', 'r'))\n\t)",
}),
ExpectMessage(&pgproto3.Describe{
ObjectType: 'S',