Обсуждение: partial index

Поиск
Список
Период
Сортировка

partial index

От
Tatsuo Ishii
Дата:
I have created a test data using pgbench, played with the partial
index.

test=# create index myindex on accounts(aid) where bid <> 0;
CREATE
test=# explain select * from accounts where aid < 10 and bid <> 0;

and I got a log message:

DEBUG:  clause_pred_clause_test: unknown pred_op

Is this normal?
--
Tatsuo Ishii


Re: partial index

От
Tom Lane
Дата:
Tatsuo Ishii <t-ishii@sra.co.jp> writes:
> test=# create index myindex on accounts(aid) where bid <> 0;

> test=# explain select * from accounts where aid < 10 and bid <> 0;

> and I got a log message:

> DEBUG:  clause_pred_clause_test: unknown pred_op

> Is this normal?

Yes.  We might want to suppress those DEBUG messages before release.
The original implementation would have refused to let you create a
partial index with such a WHERE clause, since <> isn't a btree-indexable
operator.  We agreed to let people create such indexes --- but
indxpath.c's little theorem-prover can't do anything with such a
predicate, and it complains about it.
        regards, tom lane