You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Jack Christensen edited this page Sep 17, 2022
·
2 revisions
Numeric and decimal support
The Go language does not have a standard decimal type. pgx supports the PostgreSQL numeric type out of the box. However, in the absence of a proper Go type it can only be used when translated to a float64 or string. This is obviously not ideal.
The recommended solution is to use the github.com/shopspring/decimal package. pgx has support for integrating with this package, but to avoid a mandatory external dependency the integration is in a separate package.