I tested this with
Code: Select all
WITH (x := TRUE) : x
Code: Select all
r WHERE WITH (x := TRUE) : x
Hugh
Code: Select all
WITH (x := TRUE) : x
Code: Select all
r WHERE WITH (x := TRUE) : x
Code: Select all
r WHERE (WITH (x := TRUE) : x)
There's a bit of oddness in the Rel grammar around how WHERE <bool exp> is handled -- particularly as ... WHERE <bool exp> ... can appear as a subexpression within a <bool exp> -- and how WITH is handled. In short, ... WHERE <bool exp> ... can appear within WITH, but WITH can't appear within the <bool exp> of a WHERE <bool exp> unless it's explicitly "promoted" to become a general expression (that must return a BOOLEAN) by being surrounded with parentheses.HughDarwen wrote: ↑Tue Nov 27, 2018 2:37 pm Yes, I did later think of using parens, but our grammar does specify WHERE <bool exp>.
Code: Select all
WHERE WITH (p := x * 3): p > 2 AND x = 7