Replies: 1 comment 2 replies
-
|
Not familiar with those libraries, but it looks like |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a
geographycolumn and i want to use a custom type for that.I tested using these 2 libs:
github.com/twpayne/pgx-geomgithub.com/paulmach/orbThey implement geo types as well as ewkb encoding and work with
ScannerandValuerinterface.Problem is that i can't use that type directly when scanning or passing as param for insert.
Pgxv5 uses binary protocol by default and those libs also implement
PreferredFormatinterface with binary format.Scanning fails unless i manually cast it to
::byteaorST_AsBinary. Same for insert, i have to cast as::byteaor useST_GeomFromEWKB.Not sure what is happening, is this intended behavior or not? I expected binary format to be default and assumed.
These technically work but every library using pgxv5 that works with structs will fail and i have to convert every query which is bit annoying.
i have this table
Example 1 using
github.com/twpayne/pgx-geomExample 2 using
github.com/paulmach/orbBeta Was this translation helpful? Give feedback.
All reactions