pgsql: Ensure generated join clauses for child rels have correct relids

2024-04-16 Thread Tom Lane
Ensure generated join clauses for child rels have correct relids. When building a join clause derived from an EquivalenceClass, if the clause is to be used with an appendrel child relation then make sure its clause_relids include the relids of that child relation. Normally this would be true alrea

pgsql: Ensure generated join clauses for child rels have correct relids

2024-04-16 Thread Tom Lane
Ensure generated join clauses for child rels have correct relids. When building a join clause derived from an EquivalenceClass, if the clause is to be used with an appendrel child relation then make sure its clause_relids include the relids of that child relation. Normally this would be true alrea