Re: SELECT results in "ERROR: index key does not match expected index column" - Mailing list pgsql-bugs

From Thomas Munro
Subject Re: SELECT results in "ERROR: index key does not match expected index column"
Date
Msg-id CA+hUKGJPdWgC1pY5EmDv8z71VKwNXN9cz_2Lk=6TX_hjzbh_vw@mail.gmail.com
Whole thread Raw
In response to Re: SELECT results in "ERROR: index key does not match expected index column"  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Wed, Jul 3, 2019 at 10:50 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Manuel Rigger <rigger.manuel@gmail.com> writes:
> > Consider the following test case:
>
> > CREATE TABLE t0(c0 boolean UNIQUE);
> > CREATE INDEX i0 ON t0((nullif(FALSE, TRUE)));
> > INSERT INTO t0(c0) VALUES(TRUE);
> > SELECT * FROM t0 WHERE nullif(FALSE, TRUE) OR t0.c0;
> > ERROR:  index key does not match expected index column
>
> Huh.  I don't see that in HEAD/v12, but it does reproduce in v11
> and quite a large number of branches before that.  Looking ...

Git bisect points to this commit as the one that fixed the problem:

commit 1a8d5afb0dfc5d0dcc6eda0656a34cb1f0cf0bdf
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date:   Sat Feb 9 17:30:43 2019 -0500

    Refactor the representation of indexable clauses in IndexPaths.

-- 
Thomas Munro
https://enterprisedb.com



pgsql-bugs by date:

Previous
From: Gavin Flower
Date:
Subject: Re: SELECT results in "ERROR: index key does not match expected indexcolumn"
Next
From: Tom Lane
Date:
Subject: Re: SELECT results in "ERROR: index key does not match expected index column"