From: | David Fetter <david(at)fetter(dot)org> |
---|---|
To: | PG Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | CTE bug? |
Date: | 2009-09-08 20:15:03 |
Message-ID: | 20090908201503.GA3321@fetter.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Folks,
I tried the following and it broke:
WITH RECURSIVE t(j) AS (
WITH RECURSIVE s(i) AS (
VALUES (1)
UNION ALL
SELECT i+1 FROM s WHERE i < 10
) SELECT i AS j FROM s
UNION ALL
SELECT j+1 FROM t WHERE j < 10
)
SELECT * FROM t;
ERROR: relation "s" does not exist
LINE 6: ) SELECT i AS j FROM s
^
Shouldn't this work?
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
From | Date | Subject | |
---|---|---|---|
Next Message | James Pye | 2009-09-08 21:02:40 | Re: Triggers on columns |
Previous Message | Alvaro Herrera | 2009-09-08 20:07:20 | Re: Disable and enable of table and column constraints |