-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Postgres driver ignores .persistent(false)
#3198
Comments
It's not that it ignores the flag, strictly speaking. It does as it says on the tin: it won't retain the prepared statement after execution. The problem is that it always prepares the statement with an explicit name because it uses the same code path for both cases. |
Is this something that a newish Rust programmer would have a chance implementing? Is it just about using a random statement name each time when the |
Is this where the code is? Any pointers on what needs to change? I'm assuming it has something to do with If I can fork sqlx and make a change, just so I can get my little project working, that would be fantastic. |
Bug Description
It is not presently possible to turn off the Postgres driver's use of named prepared statements. This is a blocker for users whose database doesn't support these. For example, Supabase has introduced a new pooler for all hosted instances which doesn't presently support saving these statements, so sqlx no longer works with that service.
I discovered this sqlx limitation via Discord. In a thread there, @abonander said:
Minimal Reproduction
I don't know how to provide this given that my reproduction steps involve using the Supabase hosted service with credentials and whatnot. However, the issue is independent of that.
Info
rustc --version
: rustc 1.77.1 (7cf61ebde 2024-03-27)The text was updated successfully, but these errors were encountered: