Re: Remove restrictions in recursive query - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Remove restrictions in recursive query
Date
Msg-id CA+TgmoaD_hd-siBn4ROiXCZC=B0MasPDE2fisYD8SOOGWdE-Eg@mail.gmail.com
Whole thread Raw
In response to Re: Remove restrictions in recursive query  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Thu, Mar 27, 2025 at 12:37 PM Robert Haas <robertmhaas@gmail.com> wrote:
> It's not a problem if UNION ALL is used within the initial_query and
> it's not a problem if UNION ALL is used within the iterated_query. But
> you can't apply ORDER BY to the result of the UNION, because the UNION
> is kind of fake -- we're not running the UNION as a single query,
> we're running the two halves separately, the first once and the second
> as many times as needed.

Oops. The two UNION ALL references in the first part of this paragraph
should have said ORDER BY.

--
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Remove restrictions in recursive query
Next
From: "David G. Johnston"
Date:
Subject: Re: Remove restrictions in recursive query