From 6d45bb8d6c8e4bfe66cf983def88de776a85f86f Mon Sep 17 00:00:00 2001 From: i4colorfixer Date: Tue, 6 Jul 2021 17:17:57 +0800 Subject: [PATCH] fix postgres datatype NUMERIC scan --- dialects/postgres.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dialects/postgres.go b/dialects/postgres.go index a2611c60..ecbe3f3c 100644 --- a/dialects/postgres.go +++ b/dialects/postgres.go @@ -1393,7 +1393,7 @@ func (p *pqDriver) GenScanResult(colType string) (interface{}, error) { case "TINYINT", "INT", "INT8", "INT4": var s sql.NullInt32 return &s, nil - case "FLOAT", "FLOAT4": + case "FLOAT", "FLOAT4", "NUMERIC": var s sql.NullFloat64 return &s, nil case "DATETIME", "TIMESTAMP":