Re: WITH and WITH RECURSIVE in single query

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Maxim Boguk <maxim(dot)boguk(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: WITH and WITH RECURSIVE in single query
Date: 2011-12-05 03:41:44
Message-ID: 23754.1323056504@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Maxim Boguk <maxim(dot)boguk(at)gmail(dot)com> writes:
> Is here any way to combine WITH and WITH RECURSIVE into single query?

You have to put RECURSIVE immediately after WITH, but that doesn't force
you to actually make any particular query in the WITH-list recursive.
It just makes it possible for a query to be self-referential, not required.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Maxim Boguk 2011-12-05 03:43:43 Questions about setting an array element value outside of the update
Previous Message Maxim Boguk 2011-12-05 03:28:55 WITH and WITH RECURSIVE in single query