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

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: jinhuilai(at)email(dot)ncu(dot)edu(dot)cn, PostgreSQL Bug List <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #18930: PostgreSQL fails to handle INTERSECT operation involving Empty Table
Date: 2025-05-15 14:15:20
Message-ID: CAKFQuwY1KCd+dVGPFPjAs=X4-YgCGL7LLbfGmF5cirrKwRDJbw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, May 15, 2025, 07:27 PG Bug reporting form <noreply(at)postgresql(dot)org>
wrote:

> The following bug has been logged on the website:
>
> Bug reference: 18930
> Logged by: jinhui lai
> Email address: jinhuilai(at)email(dot)ncu(dot)edu(dot)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.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Andrei Lepikhov 2025-05-15 14:26:42 Re: Postgres: Queries are too slow after upgrading to PG17 from PG15
Previous Message David G. Johnston 2025-05-15 14:14:13 Re: BUG #18932: PostgreSQL fails to handle EXCEPT operation when the left branch is an Empty Table