Search Postgresql Archives

indexing date_part

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux