ORA-XQ-131-B: permitting Expr (instead of ExprSingle) in WhereClause looks dangerous

SECTION 3.8: FLWOR expressions

Rule [46] WhereClause uses Expr on the right hand side and 
not ExprSingle.  I haven't come up with any examples to show
that this is an outright bug, but it looks dangerous to allow
a comma operator not surrounded by parentheses in this context.
Also, a WhereClause such as "where expr1, expr2" is not intuitive
or easy to understand. It is not equivalent to 
"where expr1 and expr2" and it is not equivalent to 
"where expr1 or expr2".  This is seen from "where 0, 0".  The
effective boolean value of (0, 0) is true (any sequence of 
length greater than 1 is true), whereas the effective boolean
value of both "0 and 0" and "0 or 0" is false.  
Note that every other clause of the FLWOR expression is 
built on ExprSingle.  

- Steve B.

Received on Monday, 16 February 2004 16:18:08 UTC