Re: Functional indices with const params.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Functional indices with const params.
Дата
Msg-id 8064.965315276@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Functional indices with const params.  (Denis Perchine <dyp@perchine.com>)
Список pgsql-general
Denis Perchine <dyp@perchine.com> writes:
> is it possible to create functional indices with constant params?

> create index ix_s_m on stats(date_part('month', sent_date));

No.

> If it is not possible is there any workarounds for this?

Sure: make your own function that does what you want with no extra
parameters.  I don't think an SQL function works as an index function
right now (I may be able to fix that for 7.1, but no promises), but a
plpgsql (or pl-anything) function should work.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] random() function produces wrong range
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Unions in views