summaryrefslogtreecommitdiff
path: root/django/db/models/sql
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2023-12-15 18:30:35 -0500
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2024-01-12 21:40:18 +0100
commit92d6cff6a2fee7a3f9244081b84fd82c50cc71aa (patch)
tree4dc8b6bda31bb5efa5ee406aa64467fea3c43bad /django/db/models/sql
parent02eaee12095eebb3d07d02e7b0bdc3f64785d379 (diff)
Fixed #35028 -- Disabled server-side bindings for named cursors on psycopg >= 3.
While we provide a `cursor_factory` based on the value of the `server_side_bindings` option to `psycopg.Connection` it is ignored by the `cursor` method when `name` is specified for `QuerySet.iterator()` usage and it causes the usage of `psycopg.ServerCursor` which performs server-side bindings. Since the ORM doesn't generates SQL that is suitable for server-side bindings when dealing with parametrized expressions a specialized cursor must be used to allow server-side cursors to be used with client-side bindings. Thanks Richard Ebeling for the report. Thanks Florian Apolloner and Daniele Varrazzo for reviews.
Diffstat (limited to 'django/db/models/sql')
0 files changed, 0 insertions, 0 deletions