pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-sql@postgresql.org
Subject: Re: Combining several CTEs with a recursive CTE
Date: Tue, 20 Sep 2011 16:54:28 +0200
Message-ID: <j5a9dt$9hc$1@dough.gmane.org> (raw)
In-Reply-To: <1E5EC0E1-13DB-4346-B8EE-212F4DC4CCEA@yahoo.com>
References: <j59o2m$dn1$1@dough.gmane.org>
	<1E5EC0E1-13DB-4346-B8EE-212F4DC4CCEA@yahoo.com>

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





view thread (3+ messages)

Message-ID: <j5a9dt$9hc$1@dough.gmane.org>
Permalink:  ../j5a9dt$9hc$1@dough.gmane.org/
Also on:    postgresql.org/message-id/j5a9dt$9hc$1@dough.gmane.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: spam_eater@gmx.net
  Subject: Re: Combining several CTEs with a recursive CTE
  In-Reply-To: <j5a9dt$9hc$1@dough.gmane.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox