1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00
Commit Graph

8 Commits

Author SHA1 Message Date
Simon Charette
92d6cff6a2 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.
2024-01-12 21:40:18 +01:00
Nick Pope
af6e7e3de8 Refs #34986 -- Fixed backends.postgresql.test_server_side_cursors.ServerSideCursorsPostgres tests for PyPy. 2023-12-07 09:43:20 +01:00
Nick Pope
2c6e4a29b0 Fixed typo in tests/backends/postgresql/test_server_side_cursors.py. 2023-12-06 09:17:49 +01:00
django-bot
9c19aff7c7 Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
Tim Graham
a862af3839
Fixed #28893 -- Removed unnecessary dict.items() calls. 2017-12-06 17:17:59 -05:00
Dražen Odobašić
d97f026a7a Fixed #28817 -- Made QuerySet.iterator() use server-side cursors after values() and values_list(). 2017-11-21 10:33:56 -05:00
Tim Graham
6cb6382639 Added assertion helpers for PostgreSQL's server-side cursor tests. 2017-11-21 08:21:09 -05:00
Mariusz Felisiak
8cb1b1fd8e Reorganized backends tests. 2017-06-21 12:00:47 -04:00