Re: [PATCH] Allow multiple recursive self-references

From: Denis Hirn <denis(dot)hirn(at)uni-tuebingen(dot)de>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Cc: vignesh C <vignesh21(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pantelis Theodosiou <ypercube(at)gmail(dot)com>, David Fetter <david(at)fetter(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Zhihong Yu <zyu(at)yugabyte(dot)com>
Subject: Re: [PATCH] Allow multiple recursive self-references
Date: 2022-01-15 10:01:09
Message-ID: 060fc03a-e1c0-965e-526a-d407b92afd87@uni-tuebingen.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 14. Jan 2022, at 13:21, Peter Eisentraut
<peter(dot)eisentraut(at)enterprisedb(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2022-01-15 10:23:49 Re: Skipping logical replication transactions on subscriber side
Previous Message Julien Rouhaud 2022-01-15 09:29:07 Re: Avoid erroring out when unable to remove or parse logical rewrite files to save checkpoint work