Этот коммит содержится в:
Christopher Speller
2019-07-29 07:39:56 -07:00
коммит произвёл GitHub
родитель f226f672f3
Коммит 20825a1702
547 изменённых файлов: 44126 добавлений и 27501 удалений

9
vendor/github.com/lib/pq/encode.go сгенерированный поставляемый
Просмотреть файл

@@ -117,11 +117,10 @@ func textDecode(parameterStatus *parameterStatus, s []byte, typ oid.Oid) interfa
}
return i
case oid.T_float4, oid.T_float8:
bits := 64
if typ == oid.T_float4 {
bits = 32
}
f, err := strconv.ParseFloat(string(s), bits)
// We always use 64 bit parsing, regardless of whether the input text is for
// a float4 or float8, because clients expect float64s for all float datatypes
// and returning a 32-bit parsed float64 produces lossy results.
f, err := strconv.ParseFloat(string(s), 64)
if err != nil {
errorf("%s", err)
}