Answer the question
In order to leave comments, you need to log in
How to overcome PostgreSQL prepared statement error?
I can not understand how to overcome this error, who faced, tell me ..
STATEMENT: DEALLOCATE pdo_stmt_00000001
2017-10-20 09:36:45.379 UTC [30435] [email protected] ERROR: prepared statement "pdo_stmt_00000001" does not exist
2017-10-20 09:36:45.379 UTC [30435] [email protected] STATEMENT: DEALLOCATE pdo_stmt_00000001
2017-10-20 09:36:45.382 UTC [30435] [email protected] ERROR: prepared statement "pdo_stmt_00000001" already exists
2017-10-20 09:36:45.382 UTC [30435] [email protected] STATEMENT: SELECT * FROM sessions WHERE token = $1 LIMIT 1;
Answer the question
In order to leave comments, you need to log in
As Melkij suggested , pgbouncer does not support server-side prepared statements in transaction-mode. Therefore, we simply enable emulation inside PDO.
$pdo = new \PDO(PG_DSN, PG_USER, PG_PASSWORD);
$pdo->setAttribute(\PDO::ATTR_EMULATE_PREPARES, true);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question