On Mon, 17 Aug 2026 at 20:29, 陈列行 <2320415112(at)qq(dot)com> wrote:
> ### Expected behaviour
>
> The planner should replace `A INTERSECT empty` and `empty EXCEPT B` with the
> equivalent empty branch query `SELECT ... FROM A WHERE FALSE`.
A new optimisation was added in 03d40e4b5 to improve this situation.
That change was incorporated into PostgreSQL 19, which is in beta.
Feel free to try it out and provide any feedback that you have.
David