On Mon, Dec 5, 2011 at 3:15 PM, David Johnston wrote:
> On Dec 4, 2011, at 22:58, Maxim Boguk wrote:
>
>
>
> On Mon, Dec 5, 2011 at 2:45 PM, David Johnston <
> pol...@yahoo.com> wrote:
>
>> On Dec 4, 2011, at 22:28, Maxim Boguk <
>> maxim.bo...@gmail.com> wrote:
>>
>> > Hi.
>> >
>> > Is here a
On Dec 4, 2011, at 22:58, Maxim Boguk wrote:
>
>
> On Mon, Dec 5, 2011 at 2:45 PM, David Johnston wrote:
> On Dec 4, 2011, at 22:28, Maxim Boguk wrote:
>
> > Hi.
> >
> > Is here any way to combine WITH and WITH RECURSIVE into single query?
> >
> > Something like:
> >
> > WITH t AS (some comp
On Mon, Dec 5, 2011 at 2:45 PM, David Johnston wrote:
> On Dec 4, 2011, at 22:28, Maxim Boguk wrote:
>
> > Hi.
> >
> > Is here any way to combine WITH and WITH RECURSIVE into single query?
> >
> > Something like:
> >
> > WITH t AS (some complicated select to speed up recursive part),
> > RECURSI
On Dec 4, 2011, at 22:28, Maxim Boguk wrote:
> Hi.
>
> Is here any way to combine WITH and WITH RECURSIVE into single query?
>
> Something like:
>
> WITH t AS (some complicated select to speed up recursive part),
> RECURSIVE r AS
> (
> ...
> UNION ALL
> ...
> )
>
> ?
>
> --
> Maxim Boguk
>
Maxim Boguk 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,