Re: Check SubPlan clause for nonnullable rels/Vars

2022-11-06 Thread Richard Guo
On Sun, Nov 6, 2022 at 3:33 AM Tom Lane wrote: > Richard Guo writes: > > [ v2-0001-Check-SubPlan-clause-for-nonnullable-rels-Vars.patch ] > > Pushed with cosmetic changes: > > * I don't believe in "add at the end" as a principle for placement > of new code. There's usually some other logic that

Re: Check SubPlan clause for nonnullable rels/Vars

2022-11-05 Thread Tom Lane
Richard Guo writes: > [ v2-0001-Check-SubPlan-clause-for-nonnullable-rels-Vars.patch ] Pushed with cosmetic changes: * I don't believe in "add at the end" as a principle for placement of new code. There's usually some other logic that will give more consistent results. In cases like this, orde

Re: Check SubPlan clause for nonnullable rels/Vars

2022-11-03 Thread Richard Guo
On Thu, Nov 3, 2022 at 4:26 AM Tom Lane wrote: > * I don't believe you can prove anything from an ALL_SUBLINK SubPlan, > because it will return true if the sub-query returns zero rows, no > matter what the testexpr is. (Maybe if you could prove the sub-query > does return a row, but I doubt it's

Re: Check SubPlan clause for nonnullable rels/Vars

2022-11-02 Thread Tom Lane
Richard Guo writes: > While wandering around the codes of reducing outer joins, I noticed that > when determining which base rels/Vars are forced nonnullable by given > clause, we don't take SubPlan into consideration. Does anyone happen to > know what is the concern behind that? Probably just di