Hello Amit, On 2020-Sep-08, Amit Langote wrote:
> On Tue, Sep 8, 2020 at 8:44 AM Alvaro Herrera <alvhe...@2ndquadrant.com> > wrote: > > On 2020-Sep-07, Alvaro Herrera wrote: > > > > > Ah, it looks like we can get away with initializing the RRI to 0, and > > > then explicitly handle that case in ExecPartitionCheckEmitError, as in > > > the attached (which means reindenting, but I left it alone to make it > > > easy to read). > > At this point, I think it may be clear that ri_RangeTableIndex being > set to a dummy value isn't problematic. Yep ... I misled myself. > Yeah, we need to make sure that ExecPartitionCheck gets a slot whose > TupleDesc matches the partition's. Actually we do have such dedicated > slots for partitions around (for both sub-partitioned and leaf > partitions), Yeah, that's what I was looking for. > so we can simply use them instead of creating one from > scratch for every use. It did take some code rearrangement to > actually make that work though. Thanks. It doesn't look too bad ... I'd say it even looks easier to read now in terms of code structure. > Attached is the latest patch including those changes. Also, I have > merged your earlier "fixes" patch and updated the isolation test to > exercise a case with sub-partitioned default partition, as well as > varying attribute numbers. Patch applies as-is to both HEAD and v13 > branches, but needs slight changes to apply to v12 branch, so also > attaching one for that branch. Thanks, will dispatch it shortly. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services