Skip to content

Fix postgresql time #1623

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

Closed
wants to merge 2 commits into from
Closed

Conversation

provokateurin
Copy link

Go's time.Time type is not compatible with Postgres' pg_catalog.time type. Therefore this fix uses pgtype.Time which is the correct one. pg_catalog.timetz would also need to be fixed, but there is no pgtype.TimeTZ (see jackc/pgtype#150 and jackc/pgx#759).

Copy link
Collaborator

@kyleconroy kyleconroy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The standalone pgtype package has been deprecated as of pgx/v5. The types will also no longer be compatible with lib/pq.

With that in mind, adding pgx/v5 support will fix this. But we're going to do that all at once.

@kyleconroy
Copy link
Collaborator

Going to close this PR. We'll address this when adding support for pgx/v5

@GeertJohan
Copy link

Having it fixed with pgx/v5 sounds good. But is there any reason why we cannot merge this (realtively small change) now so that it already works with this version?

@kyleconroy
Copy link
Collaborator

The reason I don't want to merge this is the unclear future of the pgtype package. I grieve it will be deprecated in less than a week.

@StevenACoffman
Copy link
Contributor

StevenACoffman commented Dec 24, 2022

Hey, so jackc has continued to maintain pgtype, but we've since landed some pgx/v5 support, so we can update this PR for that.

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.

4 participants