Skip to content

Diesel Error: prepared statement "__diesel_stmt_0" already exists or unnamed prepared statement does not exist #3575

Answered by weiznich
davidxhive asked this question in Q&A
Discussion options

You must be logged in to vote

This error message indicates that your database system does not support named prepared statements. That either means that you do not use postgres as backend, but something else that speaks postgres wire protocol. In that case that's an important missing feature in their implementation and should be fixed there.
The other variant is that you use an additional extern connection pooling layer like pgbouncer that also don't support prepared statements in some configurations. You cannot use that in combination with diesels build-in PgConnection as the usage of prepared statements is considered to be a fundamental security feature for diesel.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@davidxhive
Comment options

@evforde
Comment options

@weiznich
Comment options

@dhbradshaw
Comment options

@weiznich
Comment options

Answer selected by davidxhive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants