Skip to content

Conversation

@kyleconroy
Copy link
Collaborator

@kyleconroy kyleconroy commented Aug 21, 2021

The pgtype package contains Go types for over 70 PostgreSQL types. It's used heavily inside of pgx. While this introduces a dependency on an external package for generated code that could change at any time, the current behavior around many of these types is broken. Scanning a NULL value into a MAC addresses or IP address does not work.

Fixes #739
Fixes #719

@kyleconroy kyleconroy changed the title codgen/golang: pgtype for network address types codgen/golang: Use p[gq]type for network address types Aug 21, 2021
@kyleconroy kyleconroy merged commit ca0f3de into main Aug 21, 2021
@kyleconroy kyleconroy deleted the kyle/use-pgtype-for-network-address branch August 21, 2021 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NULL inet and json types are not handled PostgreSQL type "cidr" should be mapped to net.IPNet

2 participants