Ashutosh Bapat <ashutosh.bapat.oss@gmail.com> writes:
> On Mon, Dec 5, 2022 at 8:13 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I don't especially like "rel->nparts = 0" as a way of disabling
>> partitionwise join ...
> ... If we can not generate AppendPath for a
> join relation, it means there is no way to compute child join
> relations and thus the relation is not partitioned. So setting
> rel->nparts = 0 is right.
If we had nparts > 0 before, then it is partitioned for some value
of "partitioned", so I don't entirely buy this argument.
> Probably we should add macros similar to
> dummy relation for marking and checking partitioned relation. I see
> IS_PARTITIONED_RELATION() is defined already. Maybe we could add
> mark_(un)partitioned_rel().
Hiding it behind a macro with an explanatory name would be an
improvement, for sure.
regards, tom lane