Results 345 comments of Jack Christensen
trafficstars

PostgreSQL `numeric` type has a different binary format than `float8` or `bigint`. The `DecodeBinary` method implemented on `pgtype.Float8` and `pgtype.Int8` expects the incoming data to be a PostgreSQL `float8` or...

> One more thing, is there a reason for not having Marshal/Unmarshal JSON for Float4 and Float8? Because if it did, it would be a lot easier for me. I...

I'm not sure about that. Saying it is not yet implemented implies that it _could_ be implemented. But there are no standard Go types that could be mapped to those...

I'm open to supporting some type being settable. Though I wouldn't do a `[][]float64`. The extra slice per point would be inefficient. I would use `[]pgtype.Vec2` instead. ... In fact,...

It's okay with the one change I mentioned. If you want to do something similar for the other geometric types that would be fine.

I don't remember why `EnumArray` doesn't implement the binary format because the binary format for an array requires knowing the OID of the element. I think if you want to...

> Unfortunately it looks like GenericText can't be used directly as a ValueTranscoder as it also doesn't implement the binary format. Ah, true. Hmmm, the regular `Text` type does implement...

A few thoughts: If you use the binary format you don't have to worry about interval format. But if you need to work with the text format it would be...

PostgreSQL has two transfer formats for almost all data types: a text format and a binary format. The text format is what you see in `psql` and what is affected...