indexing date_part

Поиск
Список
Период
Сортировка
От DEV
Тема indexing date_part
Дата
Msg-id E1D5qfP-0007wl-00@umpa-us.com
обсуждение исходный текст
Ответы Re: indexing date_part
Список pgsql-general

Hello all,

 

I am interested in setting up an index with a date_part as part of it… From what I have been able to find I need to write a function that will return the date_part that I want I have tried
CREATE FUNCTION month_idxable(date) returns date AS 'SELECT date_part('month', date) from mchistw' LANGUAGE 'SQL' WITH (iscachable);

And I get: ERROR:  parser: parse error at or near "month" at character 72

 

So what am I doing wrong and how would I include the function into an index?

 

Thank you all for all of your help!

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

Предыдущее
От: Ragnar Hafstað
Дата:
Сообщение: Re: Problems with pgcrypto and special characters
Следующее
От: "Jim C. Nasby"
Дата:
Сообщение: Fast major-version upgrade (was: postgresql 8.0 advantages)