SELECT results in "ERROR: index key does not match expected index column"

Поиск
Список
Период
Сортировка
От Manuel Rigger
Тема SELECT results in "ERROR: index key does not match expected index column"
Дата
Msg-id CA+u7OA4CV21mUfwjQj3va7MWvqB2EAdJT31=uf_yArBRVzQjYw@mail.gmail.com
обсуждение исходный текст
Ответы Re: SELECT results in "ERROR: index key does not match expected index column"  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Hi everyone,

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; -- expected: row
is fetched, actual: ERROR:  index key does not match expected index
column

The SELECT above results in an error, which is unexpected. When
removing the UNIQUE keyword from c0, the CREATE INDEX statement, or
the OR t0.c0 in the query, the error does not occur. The error can
also be reproduced with other data types, such as INT.

I'm using the following Postgres version: psql (11.4 (Ubuntu
11.4-1.pgdg19.04+1)).

Best,
Manuel



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

Предыдущее
От: Manuel Rigger
Дата:
Сообщение: Re: GROUP BY and inheritance issue
Следующее
От: Tom Lane
Дата:
Сообщение: Re: SELECT results in "ERROR: index key does not match expected index column"