1e485c1c3b3a757f07124a6a7b71510dd0c008a2
Previously if we provided a parameter that was an array of strings such
as []string{"0.0.0.0/8"}, we would encode this when sending to Postgres
as ::ffff:0.0.0.0/8. From what I can tell, this is because when parsing
the IP/network using net functions, we get a byte array that is 16 bytes
long, even if it is an IPv4 network. In Inet.EncodeBinary(), we look at
the length of the IP to determine what family the input is, and saw it
as IPv6 because of this.
We now always normalize IPv4 addresses using To4().
pgtype
pgtype implements Go types for over 70 PostgreSQL types. pgtype is the type system underlying the
https://github.com/jackc/pgx PostgreSQL driver. These types support the binary format for enhanced performance with pgx.
They also support the database/sql Scan and Value interfaces and can be used with https://github.com/lib/pq.
Description
Languages
Go
98.5%
HTML
1.3%
Shell
0.2%