Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
None
Description
The 1.x connector supported conn.cursor(prepared=True), where the first execute() prepares the statement and every subsequent execute() ignores its SQL argument, re-running the prepared statement with new parameters. This option was dropped in 2.0, breaking code that relied on it.
Re-add prepared as a deprecated compatibility option across all sync cursor implementations (pure-Python and C ) (async was not available in 1.1)
First execute() prepares via the binary protocol, later calls ignore their SQL and rebind params (exact 1.x behavior, including empty-string SQL).
Emit a DeprecationWarning pointing users to binary=True, which reuses prepared statements while the SQL is unchanged without the ignored-SQL footgun.
Migration: cursor(prepared=True) -> cursor(binary=True), keep executing the same SQL.