Fix stdlib number size conversions

pull/783/head
Jack Christensen 2020-06-06 09:54:19 -05:00
parent 81140f6c27
commit 4e50623069
1 changed files with 3 additions and 3 deletions

View File

@ -547,7 +547,7 @@ func (r *Rows) Next(dest []driver.Value) error {
scanPlan := ci.PlanScan(fd.DataTypeOID, fd.Format, &d)
r.valueFuncs[i] = func(src []byte) (driver.Value, error) {
err := scanPlan.Scan(ci, fd.DataTypeOID, fd.Format, src, &d)
return d, err
return float64(d), err
}
case pgtype.Float8OID:
var d float64
@ -561,14 +561,14 @@ func (r *Rows) Next(dest []driver.Value) error {
scanPlan := ci.PlanScan(fd.DataTypeOID, fd.Format, &d)
r.valueFuncs[i] = func(src []byte) (driver.Value, error) {
err := scanPlan.Scan(ci, fd.DataTypeOID, fd.Format, src, &d)
return d, err
return int64(d), err
}
case pgtype.Int4OID:
var d int32
scanPlan := ci.PlanScan(fd.DataTypeOID, fd.Format, &d)
r.valueFuncs[i] = func(src []byte) (driver.Value, error) {
err := scanPlan.Scan(ci, fd.DataTypeOID, fd.Format, src, &d)
return d, err
return int64(d), err
}
case pgtype.Int8OID:
var d int64