Re: WITH RECURSIVE patches V0.1 TODO items

From: David Fetter <david(at)fetter(dot)org>
To: Tatsuo Ishii <ishii(at)postgresql(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: WITH RECURSIVE patches V0.1 TODO items
Date: 2008-05-27 02:23:24
Message-ID: 20080527022324.GR16218@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, May 27, 2008 at 10:10:13AM +0900, Tatsuo Ishii wrote:
> Hi,
>
> Thanks to all who respnoded to the WITH RECURSIVE patches V0.1. Here
> are TODO items so far. Lines starting with "*" are my comments and
> questions.
>
> - SEARCH clause not supported
>
> * do we need this for 8.4?

This would be very handy.

> - CYCLE clause not supported
>
> * do we need this for 8.4?
>
> - the number of "partition" is limited to up to 1
>
> * do we need this for 8.4?
>
> - "non_recursive_term UNION recursive_term" is not supported. Always
> UNION ALL" is requried. (i.e. "non_recursive_term UNION ALL
> recursive_term" is supported)
>
> * do we need this for 8.4?

Probably not.

> - mutually recursive queries are not supported
>
> * do we need this for 8.4?
>
> - mutually recursive queries are not detected
>
> * do we need this for 8.4?
>
> - cost of Recursive Scan is always 0

This should probably be fixed, but it leads to problems like:

> - infinit recursion is not detected
>
> * Tom suggested let query cancel and statement_timeout handle it.

Right for this case. Is there some way to estimate this short of a
full-on materialized views implementation? I'm guessing we'd need to
be able to cache the transitive closure of such searches.

> - only the last SELECT of UNION ALL can include self recursion name
>
> - outer joins for recursive name and tables does not work

This would be good to fix.

> - need regression tests
>
> - need docs (at least SELECT reference manual)

I started on some of that, patch attached.

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

Attachment Content-Type Size
recursive_query-6.patch.bz2 application/x-bzip2 19.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sushant Sinha 2008-05-27 02:36:33 accessing functions in the core
Previous Message Tatsuo Ishii 2008-05-27 01:10:13 WITH RECURSIVE patches V0.1 TODO items