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

WITH RECURSIVE patches 0803

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: pgsql-patches(at)postgresql(dot)org
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: WITH RECURSIVE patches 0803
Date: 2008-08-03 02:47:11
Message-ID: 20080803.114711.73374027.t-ishii@sraoss.co.jp (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Hi,

Included are the latest WITH RECURSIVE patches against CVS HEAD.
The main differences from previous patches include:

- Allow multiple query names (mutual recursion is not still allowed)

  These are some examples from the regression test:

WITH RECURSIVE
    x(id) AS (SELECT * FROM y UNION ALL SELECT id+1 FROM x WHERE id < 5),
    y(id) AS (values (1))
 SELECT * FROM x;

WITH RECURSIVE
   x(id) AS
     (SELECT 1 UNION ALL SELECT id+1 FROM x WHERE id < 3 ),
   y(id) AS
     (SELECT * FROM x UNION ALL SELECT * FROM x),
   z(id) AS 
     (SELECT * FROM y UNION ALL SELECT id+1 FROM z WHERE id < 10)
 SELECT * FROM z;

- Fix some cases where target list has subquries

WITH RECURSIVE t(id) AS (
SELECT (VALUES(1))
	UNION ALL
SELECT id+1 FROM t WHERE id < 5
)
SELECT * FROM t;

Remaining works:

1) write sgml docs

2) write README

Currently I'm writing 2) based on the one posted before.

BTW, I'm traveling to the United States from Aug 4 to Aug 12. I'm
going to join Linux World, PGDay and pgpool party at Bruce's. I hope
to meet many community poeple soon!
--
Tatsuo Ishii
SRA OSS, Inc. Japan

Attachment: recursive_query.patch.gz
Description: application/octet-stream (30.3 KB)

pgsql-hackers by date

Next:From: Tom LaneDate: 2008-08-03 04:14:16
Subject: Re: Parsing of pg_hba.conf and authentication inconsistencies
Previous:From: Robert TreatDate: 2008-08-03 02:30:18
Subject: Re: Parsing of pg_hba.conf and authentication inconsistencies

pgsql-patches by date

Next:From: Simon RiggsDate: 2008-08-06 15:37:27
Subject: Re: [HACKERS] get_relation_stats_hook()
Previous:From: Simon RiggsDate: 2008-08-02 19:12:50
Subject: Re: WIP: Transportable Optimizer Mode

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