• Tom Lane's avatar
    Fix some planner issues with degenerate outer join clauses. · f69b4b94
    Tom Lane authored
    An outer join clause that didn't actually reference the RHS (perhaps only
    after constant-folding) could confuse the join order enforcement logic,
    leading to wrong query results.  Also, nested occurrences of such things
    could trigger an Assertion that on reflection seems incorrect.
    
    Per fuzz testing by Andreas Seltenreich.  The practical use of such cases
    seems thin enough that it's not too surprising we've not heard field
    reports about it.
    
    This has been broken for a long time, so back-patch to all active branches.
    f69b4b94
initsplan.c 77.5 KB