Re: [GENERAL] indexing date_part

2005-02-28 Thread Tom Lane
Jeff Davis <[EMAIL PROTECTED]> writes: > In this case you just have a syntax error in your function. You have > tried to use a single-quoted string inside of a single-quoted string. > Escape the single quotes by writing "''" instead of "'" inside the > function definition. BTW, if you were working

Re: [GENERAL] indexing date_part

2005-02-28 Thread Jeff Davis
In this case you just have a syntax error in your function. You have tried to use a single-quoted string inside of a single-quoted string. Escape the single quotes by writing "''" instead of "'" inside the function definition. For example: CREATE FUNCTION month_idxable(date) returns date AS 'SELE

[GENERAL] indexing date_part

2005-02-28 Thread DEV
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) f