Re: WHERE column = X AND column = Y will always be zero matching rows

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: "[Quipsy] Markus Karg" <karg(at)quipsy(dot)de>
Cc: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: WHERE column = X AND column = Y will always be zero matching rows
Date: 2023-08-03 14:48:24
Message-ID: CAKFQuwZb12ZQAio5wXE-FpF=0URHe8RWk5sa-SE7jZiBsypQJA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thursday, August 3, 2023, [Quipsy] Markus Karg <karg(at)quipsy(dot)de> wrote:

> EXPLAIN SELECT column FROM Table WHERE column = X AND column = Y
>
>
>
> …says that PostgreSQL actually wants to perform a Scan!
>
>
>
> I wonder why squandering any resources into a Scan here
>

Mostly because no one wants to volunteer to write code to deal with poorly
written queries, nor, more technically, expend compute resources looking
for situations that should not happen.

David J.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Laurenz Albe 2023-08-03 14:53:13 Re: WHERE column = X AND column = Y will always be zero matching rows
Previous Message Justin Tocci 2023-08-03 14:48:03 Re: BUG #18047: ODBC to PG long transaction causes PANIC