Re: pgsql: Clarify use of temporary tables within partition trees

David Rowley <david.rowley@2ndquadrant.com>

From: David Rowley <david.rowley@2ndquadrant.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>, Robert Haas <robertmhaas@gmail.com>, Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>, pgsql-committers <pgsql-committers@postgresql.org>
Date: 2018-07-03T09:30:20Z
Lists: pgsql-hackers
On 3 July 2018 at 21:15, Michael Paquier <michael@paquier.xyz> wrote:
> Yeah.  Actually I'd like to add a test as well to test the recursion
> call of expand_partitioned_rtentry.  If you have an idea, please let me
> know or I'll figure out one by myself and add it probably in
> create_table.sql.

What specifically do you want to test? There are plenty of partitioned
tests with sub-partitioned tables. Going by [1], there's no shortage
of coverage.

Of course, the dead code I'm proposing we remove is not covered.
There's no way to cover it... it's dead.

[1] https://coverage.postgresql.org/src/backend/optimizer/prep/prepunion.c.gcov.html


-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


Commits

  1. Remove dead code for temporary relations in partition planning

  2. Clarify use of temporary tables within partition trees

  3. Expand partitioned table RTEs level by level, without flattening.