From: | gustavo halperin <ggh(dot)develop(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Dynamic Partial Index |
Date: | 2006-08-17 17:50:31 |
Message-ID: | 44E4AC67.3070802@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello
I'm interesting in a partial index for a rows that aren't older than 6
mounts, something like the sentence below:
--------------------------------------------------------------------------------------------------------------------------------------------------
/CREATE INDEX name_for_the_index ON table (the_column_of_type_date)
WHERE ( the_column_of_type_date > (current_date - interval '6
month')::date );/
--------------------------------------------------------------------------------------------------------------------------------------------------
But this is not posible, I receive the next error:
--------------------------------------------------------------------------------------------------------------------------------------------------
ERROR: functions in index predicate must be marked IMMUTABLE
--------------------------------------------------------------------------------------------------------------------------------------------------
So, what is the best solution for my problem?
Thank you,
Gustavo
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Davis | 2006-08-17 18:18:07 | Re: Dynamic Partial Index |
Previous Message | gustavo halperin | 2006-08-17 17:06:17 | Dynamic partial index |