PostreSQL HASH indexes do not support INCLUDE
When using an Equality
index with an include
option under postgres it crashes with the following message:
Traceback (most recent call last):
File "/home/nicoe/projets/tryton/tryton/trytond/trytond/tests/test_tryton.py", line 252, in setUpClass
activate_module(modules, lang=cls.language)
File "/home/nicoe/projets/tryton/tryton/trytond/trytond/tests/test_tryton.py", line 102, in activate_module
ActivateUpgrade(instance_id).transition_upgrade()
File "/home/nicoe/projets/tryton/tryton/trytond/trytond/ir/module.py", line 505, in transition_upgrade
pool.init(update=update, lang=lang)
File "/home/nicoe/projets/tryton/tryton/trytond/trytond/pool.py", line 167, in init
restart = not load_modules(
^^^^^^^^^^^^^
File "/home/nicoe/projets/tryton/tryton/trytond/trytond/modules/__init__.py", line 440, in load_modules
_load_modules(update)
File "/home/nicoe/projets/tryton/tryton/trytond/trytond/modules/__init__.py", line 403, in _load_modules
load_module_graph(graph, pool, update, lang)
File "/home/nicoe/projets/tryton/tryton/trytond/trytond/modules/__init__.py", line 302, in load_module_graph
model._update_sql_indexes()
File "/home/nicoe/projets/tryton/tryton/trytond/trytond/model/modelsql.py", line 483, in _update_sql_indexes
table_h.set_indexes(cls._sql_indexes)
File "/home/nicoe/projets/tryton/tryton/trytond/trytond/backend/postgresql/table.py", line 501, in set_indexes
cursor.execute(
File "/home/nicoe/projets/tryton/tryton/trytond/trytond/backend/postgresql/database.py", line 68, in execute
cursor.execute(self, sql, args)
psycopg2.errors.FeatureNotSupported: access method "hash" does not support included columns