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

Use jackc/pgtype #1135

Closed
wants to merge 1 commit into from
Closed

Use jackc/pgtype #1135

wants to merge 1 commit into from

Conversation

kyleconroy
Copy link
Collaborator

The pgtype package contains Go types for over 70 PostgreSQL types. It's used heavily inside of pgx. Each type is also tested against lib/pq.

I'm still not 100% I'm going to make this change. It introduces a dependency on an external package for generated code that could change at any time. There's no easy way to declare which version of the package that the generated code should use.

That said, the current behavior around many of these types is broken. Scanning a NULL value into a json.RawMessage just doesn't work. The same goes for MAC addresses, IP addresses, and more. The goal is to add support for all 70 types in this PR, including end-to-end tests to verify that things work against a running PostgreSQL database.

Fixes #739

@kyleconroy kyleconroy closed this Aug 21, 2021
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
1 participant