Re: Re: Should we have an optional limit on the recursion depth of recursive CTEs? - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: Re: Should we have an optional limit on the recursion depth of recursive CTEs?
Date
Msg-id CAEYLb_XJjwYEX6gYYOP8y-2wzJOkzng3_tiTqvrnrP-zcrz+xg@mail.gmail.com
Whole thread Raw
In response to Re: Re: Should we have an optional limit on the recursion depth of recursive CTEs?  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
On 20 August 2011 15:34, Bruce Momjian <bruce@momjian.us> wrote:
> Actually, using UNION instead of UNION ALL does prevent some infinite
> loops:

While that is worth pointing out, it cannot be recommended as a way of
preventing infinite recursion; after all, all 5 WITH RECURSIVE
examples in the docs use UNION ALL. It's just a different way of
specifying a terminating condition that isn't likely to be applicable
to more complicated rCTEs.

--
Peter Geoghegan       http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Re: Should we have an optional limit on the recursion depth of recursive CTEs?
Next
From: "Sergey E. Koposov"
Date:
Subject: Re: two index bitmap scan of a big table & hash_seq_search