Skip to content

Commit

Permalink
Fix scan float4 into sql.Scanner
Browse files Browse the repository at this point in the history
  • Loading branch information
jackc committed Feb 24, 2024
1 parent 654dcab commit 85f15c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pgtype/float4.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,12 +297,12 @@ func (c Float4Codec) DecodeDatabaseSQLValue(m *Map, oid uint32, format int16, sr
return nil, nil
}

var n float64
var n float32
err := codecScan(c, m, oid, format, src, &n)
if err != nil {
return nil, err
}
return n, nil
return float64(n), nil
}

func (c Float4Codec) DecodeValue(m *Map, oid uint32, format int16, src []byte) (any, error) {
Expand Down

0 comments on commit 85f15c4

Please sign in to comment.