Re: BUG #17618: unnecessary filter column <> text even after adding index - Mailing list pgsql-bugs

From Richard Guo
Subject Re: BUG #17618: unnecessary filter column <> text even after adding index
Date
Msg-id CAMbWs4-5CtCGx_nbzfPFTtDCXjmtCOR3vb-OfK4eNEAKwLQPSQ@mail.gmail.com
Whole thread Raw
In response to Re: BUG #17618: unnecessary filter column <> text even after adding index  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs

On Fri, Sep 23, 2022 at 10:10 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Richard Guo <guofenglinux@gmail.com> writes:
> So I think we need to run eval_const_expressions on indexquals before we
> check for duplicate clauses, something like attached.

[ squint... ]  Surely that was done long before we ever get here?
 
We should have already done that long before. It seems afterwards we may
do additional transformation on indexquals. In this case with a boolean
index, I can see we convert the indexqual to form 'indexkey = TRUE' in
match_boolean_index_clause.

Thanks
Richard

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #17619: AllocSizeIsValid violation in parallel hash join
Next
From: Tom Lane
Date:
Subject: Re: BUG #17618: unnecessary filter column <> text even after adding index