-
Notifications
You must be signed in to change notification settings - Fork 27
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
PGX v5 #74
Comments
I've been following the beta threads closely. I'd like to upgrade but looks like a pretty decent lift. I'll wait until it's released before planning the migration. |
Thank for for the switch response! Yes, lots of changes there. We're currently in the situation to start a project with pgx v4 (with pggen of course) but then needing to migrate at some (soon?) point. |
FYI The official release happened 10 days ago. |
I've started figuring out the work involved here. The overall goal is that pggen will migrate to pgx v5. Some helpful migration threads:
The upgrades in PGX v5 that affect pggen:
As a high-level plan:
I think most code should be straightforward to upgrade. The tricky upgrades will involve batch queries since the API dramatically changed, and maybe some |
Some changes are easier than others. Looking at the errors after pointing the generated file to v5, here are some of the simpler changes:
Some other changes are needed for @jschaf What's the current status of the migration to pgx v5? |
I would like to migrate, but it's been a low priority for me. The main reason is that we use the batch interfaces almost exclusively for our API endpoints, and I'm not looking forward to migrating to the callback approach (which is better).
Some of those probably get easier. In particular, pgxv5 has a nicer interface for building composite types. |
I am interested in a migration to pgx5, since pgx5 exposes a pipelining API I'd like to use on the same connection that I create the querier object from. |
Okay, how about this for a plan to build some momentum?
How valuable is pggen if it uses pgxv5 with a more limited feature set? |
For me 100% valuable because it allows to use pggen with pgx v5 in general. |
I agree with aight. For multiple queries, I use either stored procedures / functions or pipelining. Having pgx5 for the pipelining support, as well as a flag to disable batch creation, would be great. |
It would be great to have pgxv5 support. Batch queries are not essential to me but composite types are. I considered switching to sqlc for pgxv5 support but its lack of composite type support makes it not a viable alternative to pggen. |
PGXv5 dramatically changes how batch queries work. In v4 we use a separate batch and scan call. In v5, we use a callback with generics for type safety. Remove batch queries for now since it complicates upgrading to pgx V5. We may them back in later with more ergonomic API. #74
PGXv5 dramatically changes how batch queries work. In v4 we use a separate batch and scan call. In v5, we use a callback with generics for type safety. Remove batch queries for now since it complicates upgrading to pgx V5. We may them back in later with more ergonomic API. #74
- For pggen row structs, implement pgx.RowScanner. - Remove the typeResolver, since we're punting type resolution to the pgx.Conn type map for now. #74
- For pggen row structs, implement pgx.RowScanner. - Remove the typeResolver, since we're punting type resolution to the pgx.Conn type map for now. #74
Any update on this? If a portion of this can be delegated, I can help. |
There's a new pgx v5 beta announced and available for testing already.
jackc/pgx#1273
Will pggen be ported to support pgx v5? Some major incompatible changes at it seems.
The text was updated successfully, but these errors were encountered: