Closed mathiasHillmann closed 2 years ago
Yes. If you need more functionality you probably want to use the integration with the shopspring/decimal
package. See https://github.com/jackc/pgx/wiki/Numeric-and-decimal-support.
In the end I created this util function for my needs:
func NumericToFloat(src pgtype.Numeric) float64 {
var temp float64
src.AssignTo(&temp)
return temp
}
Is assignTo the only way to get the float value?