Re: BUG #18930: PostgreSQL fails to handle INTERSECT operation involving Empty Table

David G. Johnston <david.g.johnston@gmail.com>

From: "David G. Johnston" <david.g.johnston@gmail.com>
To: jinhuilai@email.ncu.edu.cn, PostgreSQL Bug List <pgsql-bugs@lists.postgresql.org>
Date: 2025-05-15T14:15:20Z
Lists: pgsql-bugs
On Thu, May 15, 2025, 07:27 PG Bug reporting form <noreply@postgresql.org>
wrote:

> The following bug has been logged on the website:
>
> Bug reference:      18930
> Logged by:          jinhui lai
> Email address:      jinhuilai@email.ncu.edu.cn
> PostgreSQL version: 17.5
> Operating system:   ubuntu 22.04
> Description:
>
> Hi, PostgreSQL Developers,
> Please consider such queries:
> SELECT * FROM empty_table INTERSECT SELECT * FROM not_empty_table;
> SELECT * FROM not_empty_table INTERSECT SELECT * FROM empty_table;
> Obviously, the above queries always returns an empty set. I think it should
> return an empty set quickly.
>

Also not a bug.

David J.