| Age | Commit message (Collapse) | Author |
|
Setting "check" in OPTIONS["pool"] previously raised TypeError because the
PostgreSQL backend always passed check= to ConnectionPool() and unpacked
**pool_options on top, regardless of CONN_HEALTH_CHECKS. The user's callable
now takes precedence via setdefault(); pool_options is copied first to avoid
mutating the user's settings dict.
|
|
|
|
Regression in a16eedcf9c69d8a11d94cac1811018c5b996d491.
The UNNEST strategy is affected by the same problem bulk_update has wrt/
to silent data truncation due to its usage of db_type which always returns
a parametrized subtype.
|
|
|
|
|
|
Rewrapped long docstrings and block comments to 79 characters + newline
using script from https://github.com/medmunds/autofix-w505.
|
|
PostgreSQL.
Regression in 764af7a3d6c0b543dcf659a2c327f214da768fe4.
|
|
When all values of a field with a db_default are DatabaseDefault, which
is the case most of the time, there is no point in specifying explicit
DEFAULT for all INSERT VALUES as that's what the database will do anyway
if not specified.
In the case of PostgreSQL doing so can even be harmful as it prevents
the usage of the UNNEST strategy and in the case of Oracle, which
doesn't support the usage of the DEFAULT keyword, it unnecessarily
requires providing literal db defaults.
Thanks Lily Foote for the review.
|
|
This should make bulk_create significantly faster on Postgres when provided
only literal values.
Thanks James Sewell for writing about this technique, Tom Forbes for
validating the performance benefits, David Sanders and Mariusz Felisiak
for the review.
|
|
DatabaseWrapper methods.
Following the addition of PostgreSQL connection pool support in
Refs #33497, the methods for configuring the database role and timezone
were moved to module-level functions. This change prevented subclasses
of DatabaseWrapper from overriding these methods as needed, for example,
when creating wrappers for other PostgreSQL-based backends.
Thank you Christian Hardenberg for the report and to
Florian Apolloner and Natalia Bidart for the review.
Regression in fad334e1a9b54ea1acb8cce02a25934c5acfe99f.
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
|
|
|
|
timeout value.
|
|
Co-authored-by: Florian Apolloner <florian@apolloner.eu>
Co-authored-by: Ran Benita <ran@unusedvar.com>
|
|
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.
|
|
backends.postgresql.test_server_side_cursors.ServerSideCursorsPostgres tests for PyPy.
|
|
|
|
Thanks Alex Vandiver for the report.
Regression in 09ffc5c1212d4ced58b708cbbf3dfbfb77b782ca.
|
|
|
|
django.contrib.postgres.fields.CIText/CICharField/CIEmailField/CITextField.
Per deprecation timeline.
|
|
relation on PostgreSQL.
|
|
existing database connection on PostgreSQL.
Regression in 09ffc5c1212d4ced58b708cbbf3dfbfb77b782ca.
|
|
Regression in 6a2165816394ab4bb259f6171e82417e098e97a6.
|
|
PostgreSQL.
Regression in 09ffc5c1212d4ced58b708cbbf3dfbfb77b782ca.
|
|
with psycopg version 3.
Thanks Guillaume Andreu Sabater for the report.
Co-authored-by: Florian Apolloner <apollo13@users.noreply.github.com>
|
|
|
|
Thanks Simon Charette, Tim Graham, and Adam Johnson for reviews.
Co-authored-by: Florian Apolloner <florian@apolloner.eu>
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
|
|
|
|
test_correct_extraction_psycopg2_version().
|
|
- Used connection.info instead of connection.get_parameter_status() and
connection.server_info which don't exist in psycopg 3.
- Set encoding using the client_encoding connection parameter instead
of connection.set_client_encoding() that doesn't exist in psycopg 3.
- Used the dbname connection parameter instead of deprecated
alias - database.
|
|
|
|
django.contrib.postgres.fields.CIText/CICharField/CIEmailField/CITextField.
|
|
|
|
|
|
|
|
Thanks Tim Graham for the review.
|
|
|
|
psycopg2 2.8.4 is the first release to support Python 3.8.
|
|
PostgreSQL.
|
|
|
|
database.
Thanks Kazantcev Andrey for the report.
Regression in f48f671223a20b161ca819cf7d6298e43b8ba5fe.
|
|
|
|
Fixed inner imports per isort 5.
isort 5.0.0 to 5.1.0 was unstable.
|
|
PostgreSQL.
The sql_flush() positional argument sequences is replaced by the boolean
keyword-only argument reset_sequences. This ensures that the old
function signature can't be used by mistake when upgrading Django. When
the new argument is True, the sequences of the truncated tables will
reset. Using a single boolean value, rather than a list, allows making a
binary yes/no choice as to whether to reset all sequences rather than a
working on a completely different set.
|
|
|
|
|
|
It is now a method instead of a property and returns a context manager
that yields a cursor on entry and closes the cursor and connection upon
exit.
|
|
|
|
PostgreSQL.
|
|
initialization.
This addressed a regression introduced by a96b9019320ed8236659ee520a7a017c1bafbc6f as identified by Ran Benita.
|