pgsql: Rewrite recurse_union_children to iterate, rather than recurse.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Rewrite recurse_union_children to iterate, rather than recurse.
Date: 2018-03-19 15:55:10
Message-ID: E1exx7u-0002XF-7H@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Rewrite recurse_union_children to iterate, rather than recurse.

Also, rename it to plan_union_chidren, so the old name wasn't
very descriptive. This results in a small net reduction in code,
seems at least to me to be easier to understand, and saves
space on the process stack.

Patch by me, reviewed and tested by Ashutosh Bapat and Rajkumar
Raghuwanshi.

Discussion: http://postgr.es/m/CA+TgmoaLRAOqHmMZx=ESM3VDEPceg+-XXZsRXQ8GtFJO_zbMSw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/49525c46309828b3024fe8040fa99c7dcc83933d

Modified Files
--------------
src/backend/optimizer/prep/prepunion.c | 100 ++++++++++++++++-----------------
1 file changed, 47 insertions(+), 53 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2018-03-19 15:57:25 pgsql: Generate a separate upper relation for each stage of setop plann
Previous Message David Steele 2018-03-19 13:03:50 Re: pgsql: Add tests for reinit.c