Nicolas Évrard pushed to branch branch/default at Tryton / Tryton


Commits:
de4b02c5 by Nicolas Évrard at 2023-05-27T17:12:48+02:00
Set the score to 0 for HashTranslator in PostgreSQL when include is specified

For now indexes using the HASH method do not support the use of included
columns on Postgres.

Closes #12294
- - - - -


1 changed file:

- trytond/trytond/backend/postgresql/table.py


Changes:

=====================================
trytond/trytond/backend/postgresql/table.py
=====================================
@@ -598,6 +598,8 @@
         if (len(index.expressions) > 1
                 or index.expressions[0][1].__class__.__name__ != 'Equality'):
             return 0
+        if index.options.get('include'):
+            return 0
         return 100
 
     @classmethod



View it on Heptapod: 
https://foss.heptapod.net/tryton/tryton/-/commit/de4b02c5ac9757171a70d174f10702836ccfccca

-- 
View it on Heptapod: 
https://foss.heptapod.net/tryton/tryton/-/commit/de4b02c5ac9757171a70d174f10702836ccfccca
You're receiving this email because of your account on foss.heptapod.net.


Reply via email to