BUG #17944: Partial index on boolean field is not picked when using = while the index is created with is

Поиск
Список
Период
Сортировка
От PG Bug reporting form
Тема BUG #17944: Partial index on boolean field is not picked when using = while the index is created with is
Дата
Msg-id 17944-299d21e4e9e90eda@postgresql.org
обсуждение исходный текст
Ответы Re: BUG #17944: Partial index on boolean field is not picked when using = while the index is created with is  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      17944
Logged by:          Ajeesh Sasidharan
Email address:      ajeesh2705@gmail.com
PostgreSQL version: 13.8
Operating system:   Linux
Description:

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 

SELECT count(*) from order where processed = false and creation_date <
now()

but the index is used while querying using processed is false

SELECT count(*) from order where processed is false and creation_date <
now()

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


В списке pgsql-bugs по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: BUG #17942: vacuumdb doesn't populate extended statistics on partitioned tables
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17945: Different order of definition of a constraint causes constraint violation