Re: pgsql: Clarify use of temporary tables within partition trees - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: pgsql: Clarify use of temporary tables within partition trees
Date
Msg-id 20180703064452.GB11732@paquier.xyz
Whole thread Raw
In response to Re: pgsql: Clarify use of temporary tables within partition trees  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
List pgsql-hackers
On Tue, Jul 03, 2018 at 03:29:36PM +0900, Amit Langote wrote:
> Why is this not near the beginning of expand_partitioned_rtentry()?
>
> Also, ISTM, this code would be unreachable because
> expand_inherited_rtentry would not call here if the above if statement is
> true, no?

FWIW, I understood that the intention here is to be careful,
particularly if expand_partitioned_rtentry begins to get called from a
different code path in the future, which is something that would likely
happen.  We could replace that by an assertion or even an elog(), and
change again this code in the future, now what's proposed here makes
quite some sense to me as well.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: pgsql: Clarify use of temporary tables within partition trees
Next
From: Amit Langote
Date:
Subject: Re: pgsql: Clarify use of temporary tables within partition trees