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!

Reply via email to