From 3d6520696902b8d2e4f1e296b64a5f63fad94133 Mon Sep 17 00:00:00 2001 From: Jeffrey Stiles Date: Tue, 26 Feb 2019 20:50:06 -0800 Subject: [PATCH] Fix duplicate Schema.Enums for Postges. Fixes issue https://github.com/gnormal/gnorm/issues/115 --- database/drivers/postgres/parse.go | 1 - 1 file changed, 1 deletion(-) diff --git a/database/drivers/postgres/parse.go b/database/drivers/postgres/parse.go index 25fec4f..1ca5766 100644 --- a/database/drivers/postgres/parse.go +++ b/database/drivers/postgres/parse.go @@ -599,7 +599,6 @@ func queryEnums(log *log.Logger, db *sql.DB, schemas []string) (map[string][]*da SELECT n.nspname, t.typname as type FROM pg_type t LEFT JOIN pg_catalog.pg_namespace n ON n.oid = t.typnamespace - JOIN pg_enum e ON t.oid = e.enumtypid WHERE (t.typrelid = 0 OR (SELECT c.relkind = 'c' FROM pg_catalog.pg_class c WHERE c.oid = t.typrelid)) AND NOT EXISTS(SELECT 1 FROM pg_catalog.pg_type el WHERE el.oid = t.typelem AND el.typarray = t.oid) AND n.nspname IN (%s)`