3 ms·
Prepared statements actually work fine with PGBouncer. Anonymous prepared statements via PqExecParams work completely without issue. No need to go back to escap
by jashmatthews 8y ago
Prepared statements actually work fine with PGBouncer. Anonymous prepared statements via PqExecParams work completely without issue. No need to go back to escaping and putting params in the query string!
Named prepared statements via PREPARE also work, but the client needs to use deterministic names and rescue if the query isn’t prepared: https://github.com/diesel-rs/diesel/issues/1028#issuecomment-315748691 https://github.com/diesel-rs/diesel/issues/1028#issuecomment...
- EB66 8y agoI was just about to comment the same thing. We use PgBouncer for some of our production databases and we make heavy use of prepared statements, stored procedures, etc.