pgsql: Avoid assertion failure if a setop leaf query contains setops.

2024-11-20 Thread Tom Lane
Avoid assertion failure if a setop leaf query contains setops. Ordinarily transformSetOperationTree will collect all UNION/ INTERSECT/EXCEPT steps into the setOperations tree of the topmost Query, so that leaf queries do not contain any setOperations. However, it cannot thus flatten a subquery tha

pgsql: Avoid assertion failure if a setop leaf query contains setops.

2024-11-20 Thread Tom Lane
Avoid assertion failure if a setop leaf query contains setops. Ordinarily transformSetOperationTree will collect all UNION/ INTERSECT/EXCEPT steps into the setOperations tree of the topmost Query, so that leaf queries do not contain any setOperations. However, it cannot thus flatten a subquery tha

pgsql: Avoid assertion failure if a setop leaf query contains setops.

2024-11-20 Thread Tom Lane
Avoid assertion failure if a setop leaf query contains setops. Ordinarily transformSetOperationTree will collect all UNION/ INTERSECT/EXCEPT steps into the setOperations tree of the topmost Query, so that leaf queries do not contain any setOperations. However, it cannot thus flatten a subquery tha

pgsql: Avoid assertion failure if a setop leaf query contains setops.

2024-11-20 Thread Tom Lane
Avoid assertion failure if a setop leaf query contains setops. Ordinarily transformSetOperationTree will collect all UNION/ INTERSECT/EXCEPT steps into the setOperations tree of the topmost Query, so that leaf queries do not contain any setOperations. However, it cannot thus flatten a subquery tha

pgsql: Avoid assertion failure if a setop leaf query contains setops.

2024-11-20 Thread Tom Lane
Avoid assertion failure if a setop leaf query contains setops. Ordinarily transformSetOperationTree will collect all UNION/ INTERSECT/EXCEPT steps into the setOperations tree of the topmost Query, so that leaf queries do not contain any setOperations. However, it cannot thus flatten a subquery tha

pgsql: Avoid assertion failure if a setop leaf query contains setops.

2024-11-20 Thread Tom Lane
Avoid assertion failure if a setop leaf query contains setops. Ordinarily transformSetOperationTree will collect all UNION/ INTERSECT/EXCEPT steps into the setOperations tree of the topmost Query, so that leaf queries do not contain any setOperations. However, it cannot thus flatten a subquery tha