Skip site navigation (1) Skip section navigation (2)

WITH RECURSIVE patches V0.1 TODO items

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: WITH RECURSIVE patches V0.1 TODO items
Date: 2008-05-27 01:10:13
Message-ID: 20080527.101013.85412760.t-ishii@sraoss.co.jp (view raw or flat)
Thread:
Lists: pgsql-hackers
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 weed this for 8.4?

- CYCLE clause not supported

  * do weed this for 8.4?

- the number of "partition" is limited to up to 1

  * do weed 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 weed this for 8.4?

- mutually recursive queries are not supported

  * do weed this for 8.4?

- mutually recursive queries are not detected

  * do weed this for 8.4?

- cost of Recursive Scan is always 0

- infinit recursion is not detected

  * Tom suggested let query cancel and statement_timeout handle it.

- only the last SELECT of UNION ALL can include self recursion name

- outer joins for recursive name and tables does not work

- need regression tests

- need docs (at least SELECT reference manual)

- some queries crash. Examples are following:

--non recursive term only case: crashed with V0.1 patches
WITH RECURSIVE subdepartment AS
(
  -- non recursive term
  SELECT * FROM department WHERE name = 'A'
)
SELECT * FROM subdepartment ORDER BY name;

-- recursive term only case: crashed with V0.1 patches
WITH RECURSIVE subdepartment AS
(
  -- recursive term
  SELECT sd.level + 1, d.* FROM department AS d, subdepartment AS sd
    WHERE d.parent_department = sd.id
)
SELECT * FROM subdepartment ORDER BY name;
--
Tatsuo Ishii
SRA OSS, Inc. Japan

Responses

pgsql-hackers by date

Next:From: David FetterDate: 2008-05-27 02:23:24
Subject: Re: WITH RECURSIVE patches V0.1 TODO items
Previous:From: CoutinhoDate: 2008-05-27 00:53:41
Subject: Re: Packages in oracle Style

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group