From 09ffc5c1212d4ced58b708cbbf3dfbfb77b782ca Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Thu, 1 Dec 2022 20:23:43 +0100 Subject: Fixed #33308 -- Added support for psycopg version 3. Thanks Simon Charette, Tim Graham, and Adam Johnson for reviews. Co-authored-by: Florian Apolloner Co-authored-by: Mariusz Felisiak --- django/db/backends/base/features.py | 5 +++++ django/db/backends/base/operations.py | 3 +++ 2 files changed, 8 insertions(+) (limited to 'django/db/backends/base') diff --git a/django/db/backends/base/features.py b/django/db/backends/base/features.py index a1d38d3530..190f728bba 100644 --- a/django/db/backends/base/features.py +++ b/django/db/backends/base/features.py @@ -164,6 +164,8 @@ class BaseDatabaseFeatures: # Can we roll back DDL in a transaction? can_rollback_ddl = False + schema_editor_uses_clientside_param_binding = False + # Does it support operations requiring references rename in a transaction? supports_atomic_references_rename = True @@ -335,6 +337,9 @@ class BaseDatabaseFeatures: # Does the backend support the logical XOR operator? supports_logical_xor = False + # Set to (exception, message) if null characters in text are disallowed. + prohibits_null_characters_in_text_exception = None + # Collation names for use by the Django test suite. test_collations = { "ci": None, # Case-insensitive. diff --git a/django/db/backends/base/operations.py b/django/db/backends/base/operations.py index 407681a418..4ee73c0734 100644 --- a/django/db/backends/base/operations.py +++ b/django/db/backends/base/operations.py @@ -525,6 +525,9 @@ class BaseDatabaseOperations: else: return value + def adapt_integerfield_value(self, value, internal_type): + return value + def adapt_datefield_value(self, value): """ Transform a date value to an object compatible with what is expected -- cgit v1.3