diff options
| author | Anthony Joseph <ajosephau@users.noreply.github.com> | 2024-10-23 22:13:18 +1100 |
|---|---|---|
| committer | Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> | 2024-10-30 15:54:48 +0100 |
| commit | 3a8f52fbc6fe2ff646a2da4165497d82117e4a92 (patch) | |
| tree | b2f496aadef5091699c8305ba52edc71a88e5a78 /django/db/backends/postgresql/operations.py | |
| parent | 97a6a678c406b0049bd17bcd34f1d71d96141994 (diff) | |
Fixed #35856 -- Added QuerySet.explain() support for MEMORY/SERIALIZE option on PostgreSQL 17+.
Diffstat (limited to 'django/db/backends/postgresql/operations.py')
| -rw-r--r-- | django/db/backends/postgresql/operations.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/django/db/backends/postgresql/operations.py b/django/db/backends/postgresql/operations.py index 4b179ca83f..d89f81bf7e 100644 --- a/django/db/backends/postgresql/operations.py +++ b/django/db/backends/postgresql/operations.py @@ -32,7 +32,9 @@ class DatabaseOperations(BaseDatabaseOperations): "BUFFERS", "COSTS", "GENERIC_PLAN", + "MEMORY", "SETTINGS", + "SERIALIZE", "SUMMARY", "TIMING", "VERBOSE", @@ -365,6 +367,9 @@ class DatabaseOperations(BaseDatabaseOperations): def explain_query_prefix(self, format=None, **options): extra = {} + if serialize := options.pop("serialize", None): + if serialize.upper() in {"TEXT", "BINARY"}: + extra["SERIALIZE"] = serialize.upper() # Normalize options. if options: options = { |
