numeric

command
v0.0.0-...-d57b50c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2023 License: MPL-2.0 Imports: 7 Imported by: 0

README

Numeric support

This is a small example displaying how to extend the underlying connection to support numeric types.

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.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL