From 39a00f39c55b4dbb6699fbb885b989990a7b5c39 Mon Sep 17 00:00:00 2001 From: Nick Pope Date: Tue, 12 Dec 2023 16:16:57 +0000 Subject: [PATCH] Added note about SELECT index in GROUP BY on Oracle 23c. As this isn't enabled by default and would be unsafe to enforce, just add a comment to note that this has to stay disabled. https://docs.oracle.com/en/database/oracle/oracle-database/23/nfcoa/application-development.html#GUID-EDDF041F-C10D-4334-838A-706227D7BFE0 --- django/db/backends/oracle/features.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/django/db/backends/oracle/features.py b/django/db/backends/oracle/features.py index f7937f24e3..b3531a7cc7 100644 --- a/django/db/backends/oracle/features.py +++ b/django/db/backends/oracle/features.py @@ -8,6 +8,9 @@ class DatabaseFeatures(BaseDatabaseFeatures): # Oracle crashes with "ORA-00932: inconsistent datatypes: expected - got # BLOB" when grouping by LOBs (#24096). allows_group_by_lob = False + # Although GROUP BY select index is supported by Oracle 23c+, it requires + # GROUP_BY_POSITION_ENABLED to be enabled to avoid backward compatibility + # issues. Introspection of this settings is not straightforward. allows_group_by_select_index = False interprets_empty_strings_as_nulls = True has_select_for_update = True