Tom Lane wrote:
> "Armor" <yupengstone@qq.com> writes:
> > Because PG does not pushdown qual to the none of the subquery. And I check the source code, find some comments
insrc/backend/optimizer/path/allpaths.c, which says "If the subquery contains EXCEPT or EXCEPT ALL set ops we
cannotpush quals into it, because that could change the results".
> > However, for this case, I think we can pushdown qual to the left most subquery of EXCEPT, just like other
databasedoes.
>
> That is not an adequate argument for such a change being okay. Postgres,
> with its extensible set of datatypes, has to be much more careful about
> the semantic soundness of optimizations than some other DBs do.
Can we use the record_image_ops mechanism here?
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services