Always surround WHERE clause with parentheses in EXCLUDE constraint

Closes #14449
(grafted from 7e50d52dc65227f494c6ad965917364fc08f0c5e)

--HG--
branch : 7.0
This commit is contained in:
Cédric Krier
2025-12-24 11:38:45 +01:00
parent 07b088fa9f
commit 9f65df770a
+1 -1
View File
@@ -147,7 +147,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