Why not do distinct before SetOp

ma lz <ma100@hotmail.com>

From: ma lz <ma100@hotmail.com>
To: "pgsql-general@postgresql.org" <pgsql-general@postgresql.org>
Date: 2024-11-04T09:52:12Z
Lists: pgsql-general
some sql like ' select a from t1 intersect select a from t1 '

if t1 has large number rows but has few distinct rows

select distinct a from t1 intersect select distinct a from t1;    ― this is faster than origin sql

can postgres do this optimize during plan-queries?