pg.ddx.io  pgsql-patches@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Gierth <andrew@tao11.riddles.org.uk>
Cc: Tatsuo Ishii <ishii@postgresql.org>
Cc: pgsql-hackers@postgresql.org
Subject: Re: WITH RECUSIVE patches 0723
Date: Mon, 28 Jul 2008 13:06:53 -0400
Message-ID: <23482.1217264813@sss.pgh.pa.us> (raw)
In-Reply-To: <877ib6rq6q.fsf@news-spur.riddles.org.uk>
References: <20080725001513.GF16438@fetter.org>
	<20080725.092652.105178884.t-ishii@sraoss.co.jp>
	<87r69gs967.fsf@news-spur.riddles.org.uk>
	<20080728.162925.23020498.t-ishii@sraoss.co.jp>
	<877ib6rq6q.fsf@news-spur.riddles.org.uk>

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



view thread (39+ messages)  latest in thread

Message-ID: <23482.1217264813@sss.pgh.pa.us>
Permalink:  ../23482.1217264813@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/23482.1217264813@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-patches@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andrew@tao11.riddles.org.uk, ishii@postgresql.org, pgsql-hackers@postgresql.org
  Subject: Re: WITH RECUSIVE patches 0723
  In-Reply-To: <23482.1217264813@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox