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

Re: WITH RECURSIVE patch V0.1

From: Yoshiyuki Asaba <y-asaba(at)sraoss(dot)co(dot)jp>
To: david(at)fetter(dot)org
Cc: ishii(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org,pgsql-patches(at)postgresql(dot)org
Subject: Re: WITH RECURSIVE patch V0.1
Date: 2008-05-23 18:21:01
Message-ID: 20080524.032101.737004071327915100.y-asaba@sraoss.co.jp (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Hi,

From: David Fetter <david(at)fetter(dot)org>
Subject: Re: [PATCHES] WITH RECURSIVE patch V0.1
Date: Sun, 18 May 2008 11:47:37 -0700

> I tried a bunch of different queries, and so far, only these two
> haven't worked.  Any ideas what I'm doing wrong here?
> 
> WITH RECURSIVE t(n) AS (
>     SELECT 1
> UNION ALL
>     SELECT n+1
>     FROM t
>     WHERE n < 100
> )
> SELECT * FROM t;
> ERROR:  cannot extract attribute from empty tuple slot

Thank you for the report. I've fixed.

postgres=# WITH RECURSIVE t(n) AS (
    SELECT 1
UNION ALL
    SELECT n+1
    FROM t
    WHERE n < 100
)
SELECT count(*) FROM t;
 count
-------
   100
(1 row)

Regards,
--
Yoshiyuki Asaba
y-asaba(at)sraoss(dot)co(dot)jp

In response to

Responses

pgsql-hackers by date

Next:From: David FetterDate: 2008-05-23 18:26:30
Subject: Re: WITH RECURSIVE patch V0.1
Previous:From: Gurjeet SinghDate: 2008-05-23 16:20:24
Subject: Random order of archiving files

pgsql-patches by date

Next:From: David FetterDate: 2008-05-23 18:26:30
Subject: Re: WITH RECURSIVE patch V0.1
Previous:From: Heikki LinnakangasDate: 2008-05-23 16:43:55
Subject: Free Space Map rewrite

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