From 5cee00c273caa4f67fd4e82032e6984aa79cb2ae Mon Sep 17 00:00:00 2001 From: Sam Verrall Date: Tue, 24 May 2022 16:08:18 +0100 Subject: [PATCH] Add type support for pgtype.Point --- internal/codegen/golang/postgresql_type.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/codegen/golang/postgresql_type.go b/internal/codegen/golang/postgresql_type.go index afa5a21aa7..d89ea8dd14 100644 --- a/internal/codegen/golang/postgresql_type.go +++ b/internal/codegen/golang/postgresql_type.go @@ -255,7 +255,11 @@ func postgresType(req *plugin.CodeGenRequest, col *plugin.Column) string { return "pgtype.Hstore" } return "interface{}" - + case "point": + if driver == SQLDriverPGXV4 { + return "pgtype.Point" + } + return "interface{}" case "void": // A void value can only be scanned into an empty interface. return "interface{}"