Re: BUG #17944: Partial index on boolean field is not picked when using = while the index is created with is - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #17944: Partial index on boolean field is not picked when using = while the index is created with is
Date
Msg-id 1562856.1685042425@sss.pgh.pa.us
Whole thread Raw
In response to BUG #17944: Partial index on boolean field is not picked when using = while the index is created with is  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> I have recently created a partial index on tables like following 

> create index unprocessed_order_index
>     on order (creation_date) where processed is false;

> When I am querying the table using processed = false like below, the index
> is not used 

> I was expecting to treat both = and is same, or am I wrong

IS and = are not the same.  You could argue that they have the same effect
in this particular case, but there's no logic in the planner that would
deduce that.

            regards, tom lane



pgsql-bugs by date:

Previous
From: Devrim Gündüz
Date:
Subject: Re: llvmjit.so: undefined symbol: LLVMBuildGEP Fedora 38
Next
From: Tom Lane
Date:
Subject: Re: BUG #17946: LC_MONETARY & DO LANGUAGE plperl - BUG