Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

codgen/golang: Use p[gq]type for network address types #1142

Merged
merged 2 commits into from
Aug 21, 2021

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
1 participant