Re: WITH RECUSIVE patches 0723 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: WITH RECUSIVE patches 0723
Date
Msg-id 23482.1217264813@sss.pgh.pa.us
Whole thread Raw
In response to Re: WITH RECUSIVE patches 0723  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Responses Re: WITH RECUSIVE patches 0723  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
List pgsql-hackers
Andrew Gierth <andrew@tao11.riddles.org.uk> writes:
> "Tatsuo" == Tatsuo Ishii <ishii@postgresql.org> writes:
>  Tatsuo> Included patches from Yoshiyuki should fix 1) and 2). I also
>  Tatsuo> add your SQLs to the regression test. Thanks.

> I think it needs this change in addition; without it, incorrect
> results are returned when you reference a recursive view from within
> the recursive query, due to the RecursionScan nodes becoming linked to
> the wrong tuplestores.

That whole business of using the EState to pass tuplestores back and
forth looks fundamentally broken to me anyway; there's just no way it'll
be certain to link the right nodes together in complicated cases with
multiple recursions.  The nodes should be carrying IDs (such as the name
of the WITH item) which they use to search a lookaside list.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Protocol 3, Execute, maxrows to return, impact?
Next
From: "David E. Wheeler"
Date:
Subject: Re: Do we really want to migrate plproxy and citext into PG core distribution?