> On 14. Jan 2022, at 13:21, Peter Eisentraut
<peter.eisentraut@enterprisedb.com> wrote:
>
> There is nothing in there that says that certain branches of the
UNION in a recursive query mean certain things. In fact, it doesn't even
require the query to contain a UNION at all. It just says to iterate on
evaluating the query until a fixed point is reached. I think this
supports my claim that the associativity and commutativity of a UNION in
a recursive query still apply.
>
> This is all very complicated, so I don't claim this to be
authoritative, but I just don't see anything in the spec that supports
what you are saying.
Please also have a look at SQL:2016, 7.16 <query expression> General
Rules 2) c),
which defines the evaluation semantics of recursive queries. I think
that this part
of the SQL standard refutes your argument.
Best,
-- Denis