Tom Lane <tgl@sss.pgh.pa.us> writes:
> * When we have a non-nullable expression in a sub-select's targetlist,
> and it's below an outer join, replace the expression by
> CASE WHEN flag_var THEN original_expression ELSE NULL END
> and then flatten as normal.
I don't understand how this gets you any further ahead. Doesn't it just move
the problems you have now with the original_expression to flag_var instead?
-- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's On-Demand Production
Tuning