From db10a2458380d87853e0d2f84f7edff8fca78165 Mon Sep 17 00:00:00 2001 From: Tom Lianza Date: Sat, 21 Jan 2017 14:43:33 -0800 Subject: [PATCH] Added Hstore as it's native type, and map Inet to string. --- loaders/postgres.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/loaders/postgres.go b/loaders/postgres.go index 0d84c423..85177869 100644 --- a/loaders/postgres.go +++ b/loaders/postgres.go @@ -80,7 +80,7 @@ func PgParseType(args *internal.ArgType, dt string, nullable bool) (int, string, typ = "sql.NullBool" } - case "character", "character varying", "text", "money": + case "character", "character varying", "text", "money", "inet": nilVal = `""` typ = "string" if nullable { @@ -176,6 +176,9 @@ func PgParseType(args *internal.ArgType, dt string, nullable bool) (int, string, asSlice = true typ = "byte" + case "hstore": + typ = "hstore.Hstore" + default: if strings.HasPrefix(dt, args.Schema+".") { // in the same schema, so chop off