Re: [PATCHES] WITH RECURSIVE updated to CVS TIP

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: david(at)fetter(dot)org
Cc: ishii(at)postgresql(dot)org, y-asaba(at)sraoss(dot)co(dot)jp, postgres(at)cybertec(dot)at, pgsql-patches(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCHES] WITH RECURSIVE updated to CVS TIP
Date: 2008-07-17 08:56:50
Message-ID: 20080717.175650.112619246.t-ishii@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

> On Wed, Jul 16, 2008 at 01:57:04PM +0900, Tatsuo Ishii wrote:
> > > > No idea. What do you think if we allow only one query name at the
> > > > moment.
> > >
> > > I'm not sure I understand what that has to do with sorting.
> > >
> > > Please find attached a place where I've found some problems sorting by
> > > tree by array as Asaba-san suggested.
> >
> > Humm. your problem seems to do nothing with the problem I refer to.
>
> Sorry about that. Is my problem reproducible? Is there maybe some
> way to include regression tests around it?

According to Asaba, it's not a bug with recursive query. In another
word, the query result you are getting is the expected one. Asaba?

> > What I have in my mind is something like:
> >
> > WITH RECURSIVE foo(a, b) AS
> > (SELECT ... UNION SELECT...),
> >
> > bar(c, d) AS
> > (SELECT ... FROM foo WHERE ...UNION...)
> > )
> > SELECT * FROM foo;
> >
> > In this there are two query names (foo, bar) and we need to detect the
> > dependency that bar relies on foo before processing the query.
>
> I think mutually recursive queries may have been dropped from
> SQL:2008.

I'm pretty sure that SQL:2008 has mutually recursive queries(I have
the final draft of SQL:2008 here).

> > However, as I said earlier, this kind of use case would be rare in
> > the real world, and I'd like to limit ourselves to having only one
> > query name at the moment.
> >
> > Also I suggest to concentrate on reviewing the WITH RECURSIVE
> > implementation itself now, rather than discussing how to use git
> > repository or how to write an interesting WITH RECURSIVE
> > applications.
> >
> > Don't get me wrong. I believe git is a great tool. But we have
> > limited time and need to think about the priority.
>
> Fair enough :)
>
> Cheers,
> David.
> --
> David Fetter <david(at)fetter(dot)org> http://fetter.org/
> Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
> Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
>
> Remember to vote!
> Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message H.Harada 2008-07-17 09:20:59 Re: introduction of WIP window function patch
Previous Message Simon Riggs 2008-07-17 08:26:45 Re: pgsql: Allow TRUNCATE foo, foo to succeed, per report from Nikhils.

Browse pgsql-patches by date

  From Date Subject
Next Message Tatsuo Ishii 2008-07-17 09:40:25 WITH RECUSIVE patches 0717
Previous Message daveg 2008-07-17 02:44:07 Re: pg_dump lock timeout