Re: Combining several CTEs with a recursive CTE

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Combining several CTEs with a recursive CTE
Date: 2011-09-20 14:54:28
Message-ID: j5a9dt$9hc$1@dough.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Amar Dhole 2011-09-21 05:54:55 handling duplicate row exception
Previous Message David Johnston 2011-09-20 14:15:01 Re: Combining several CTEs with a recursive CTE