• Tom Lane's avatar
    Prevent improper reordering of antijoins vs. outer joins. · 3cf86860
    Tom Lane authored
    An outer join appearing within the RHS of an antijoin can't commute with
    the antijoin, but somehow I missed teaching make_outerjoininfo() about
    that.  In Teodor Sigaev's recent trouble report, this manifests as a
    "could not find RelOptInfo for given relids" error within eqjoinsel();
    but I think silently wrong query results are possible too, if the planner
    misorders the joins and doesn't happen to trigger any internal consistency
    checks.  It's broken as far back as we had antijoins, so back-patch to all
    supported branches.
    3cf86860
initsplan.c 76.9 KB