Re: [8.1.4] Create index on timestamp fails
От | Arturo Perez |
---|---|
Тема | Re: [8.1.4] Create index on timestamp fails |
Дата | |
Msg-id | 4AA304A4DBB6414199F18D7E324EBDE9016C04CF@HAYES3.HAYESINC.ORG обсуждение исходный текст |
Ответ на | [8.1.4] Create index on timestamp fails ("Arturo Perez" <aperez@hayesinc.com>) |
Список | pgsql-general |
Hi Chris,
user_tracking is not a function, it's the name of the table containing the column entry_date. Is my syntax that far off?!
-arturo
-----Original Message-----It appears that 8.1 is stricter on checking the type of function. Look at your user_tracking function. It is probably set as volatile. You need to change it to be immutable.
From: Chris Hoover [mailto:revoohc@gmail.com]
Sent: Tuesday, August 22, 2006 3:02 PM
To: Arturo Perez
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] [8.1.4] Create index on timestamp fails
This should fix the issue.
ChrisOn 8/21/06, Arturo Perez <aperez@hayesinc.com> wrote:Hi all,
Using postgresql 8.1.4....
I have a table with an column:
entry_date | timestamp with time zone| not nullAnd when I try to create an index on it like so:
create index entry_date_idx on user_tracking(date_part('year',entry_date));I get a
ERROR: functions in index expression must be marked IMMUTABLEAccording to the mailing lists, this has been working since 7.4. What am I doing wrong?
tia,
arturo
В списке pgsql-general по дате отправления: