Always surround WHERE clause with parentheses in EXCLUDE constraint

Closes #14449
(grafted from 7e50d52dc65227f494c6ad965917364fc08f0c5e)

--HG--
branch : 6.0
This commit is contained in:
Cédric Krier committed 2025-12-24 11:38:45 +01:00
1 parent 80807f0d6f
commit c7854362b7
1 file changed
+1 -1
+1 -1
View File
@@ -144,7 +144,7 @@ class Exclude(Constraint):
for column, operator in self.excludes)
where = ''
if self.where:
where = ' WHERE ' + str(self.where)
where = ' WHERE (' + str(self.where) + ')'
return 'EXCLUDE (%s)' % exclude + where
@property