Re: support create index on virtual generated column.

Поиск
Список
Период
Сортировка
От Corey Huinker
Тема Re: support create index on virtual generated column.
Дата
Msg-id CADkLM=dtJZTrbUdFq5UznRepSoYpB2ARm4Q6yGvcgPrxwTtMrQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: support create index on virtual generated column.  (jian he <jian.universality@gmail.com>)
Ответы Re: support create index on virtual generated column.
Список pgsql-hackers
> hi.
> refactor and rebase.

fix the regress tests failure in v4.

This may need another rebase, as it doesn't apply to master.

I'm interested in this feature, specifically whether the optimizer uses the index in situations where the expression is used rather than the virtual column name.

For example:

CREATE TABLE example (
   regular_name text,
   lowecase_name text GENERATED ALWAYS AS lower(regular_name) VIRTUAL
);

CREATE INDEX example_b ON example(b);

EXPLAIN SELECT regular_name FROM example WHERE lowercase_name = 'john q smith';

EXPLAIN SELECT regular_name FROM example WHERE lower(regular_name) = 'john q smith';

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