From 12582a0fd451ab0f3d6fde2cea213a9cdd3622ba Mon Sep 17 00:00:00 2001 From: Eshton Robateau Date: Fri, 24 Nov 2023 07:39:08 +0800 Subject: [PATCH] bitsize largest option is 64 --- pgtype/numeric.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pgtype/numeric.go b/pgtype/numeric.go index dc844f2d..2444be01 100644 --- a/pgtype/numeric.go +++ b/pgtype/numeric.go @@ -762,7 +762,7 @@ func (scanPlanTextAnyToNumericScanner) Scan(src []byte, dst any) error { if strings.ContainsAny(string(src), "eE") { if bigF, ok := new(big.Float).SetString(string(src)); ok { smallF, _ := bigF.Float64() - src = []byte(strconv.FormatFloat(smallF, 'f', -1, int(bigF.Prec()))) + src = []byte(strconv.FormatFloat(smallF, 'f', -1, 64)) } }