On Fri, Apr 10, 2020 at 9:14 PM Tom Lane <t...@sss.pgh.pa.us> wrote: > > Ashutosh Bapat <ashutosh.ba...@2ndquadrant.com> writes: > > On Fri, 10 Apr 2020 at 20:44, Jeff Janes <jeff.ja...@gmail.com> wrote: > >> In that case, we really should add the PG_USED_FOR_ASSERTS_ONLY to make > >> the compiler happy. > > > Attaching my patch again. It doesn't need PG_USED_FOR_ASSERTS_ONLY as well. > > Kuntal has confirmed that this fixes the warning for him. > > I see no patch here ... >
Sorry. Here it is -- Best Wishes, Ashutosh Bapat
diff --git a/src/backend/partitioning/partbounds.c b/src/backend/partitioning/partbounds.c index 7607501fe7..4681441dcc 100644 --- a/src/backend/partitioning/partbounds.c +++ b/src/backend/partitioning/partbounds.c @@ -1021,7 +1021,6 @@ partition_bounds_merge(int partnatts, List **outer_parts, List **inner_parts) { PartitionBoundInfo outer_binfo = outer_rel->boundinfo; - PartitionBoundInfo inner_binfo = inner_rel->boundinfo; /* * Currently, this function is called only from try_partitionwise_join(), @@ -1032,7 +1031,7 @@ partition_bounds_merge(int partnatts, jointype == JOIN_ANTI); /* The partitioning strategies should be the same. */ - Assert(outer_binfo->strategy == inner_binfo->strategy); + Assert(outer_binfo->strategy == inner_rel->boundinfo->strategy); *outer_parts = *inner_parts = NIL; switch (outer_binfo->strategy)