-
Notifications
You must be signed in to change notification settings - Fork 836
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
Is somehow possible to import multiple versions? #1480
Comments
We can't unregister driver, but we can check if already registered The drivers could be registered with the major vesion in mind In my example, it could be
alternative, that can collide with
Other way to explicitly choose the "default" driver
|
I like this idea. |
I will check if my premise is valid in some free time. I'm a bit worried about how the *) the safety is a crucial condition for calling |
I expect it should be fine. From the Go spec (https://go.dev/ref/spec#Program_initialization_and_execution):
|
The jackc's pgx driver does support multiple version through driver name containing major version. This doesn't work out of the box with named parameters. jackc/pgx#1480
Describe the bug
If two pgx/stdlib versions are imported, it leads to panic.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Could import both at the same time, when Go modules allow it thanks to version suffix
/v2
.Actual behavior
Panics.
It doesn't allow A/B release behind feature flag.
Version
go version go1.19.5 linux/amd64
The text was updated successfully, but these errors were encountered: