Re: Combining several CTEs with a recursive CTE - Mailing list pgsql-sql

From Thomas Kellerer
Subject Re: Combining several CTEs with a recursive CTE
Date
Msg-id j5a9dt$9hc$1@dough.gmane.org
Whole thread Raw
In response to Re: Combining several CTEs with a recursive CTE  (David Johnston <polobo@yahoo.com>)
Responses handling duplicate row exception
List pgsql-sql
David Johnston, 20.09.2011 16:15:
>> I'm just wondering if this is intended behavioury, simply not (yet)
>> implemented or even invalid according to the standard? I didn't
>> find any reference that it's not allowed in the manual.
>>
>> Regards Thomas
>>
>>
> Try sticking the recursive keyword after the "with" if any of the
> following CTEs are recursive.
>
> WITH RECURSIVE normal 1 AS () ,recursine1 AS () ,normal2 AS ()
> ,recursine2 AS () SELECT ...
>
> David J.


Ah! That does the trick.

Thanks
Thomas




pgsql-sql by date:

Previous
From: David Johnston
Date:
Subject: Re: Combining several CTEs with a recursive CTE
Next
From: Amar Dhole
Date:
Subject: handling duplicate row exception