Search Postgresql Archives

Re: [8.1.4] Create index on timestamp fails

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

 



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-----
From: Chris Hoover [mailto:revoohc@xxxxxxxxx]
Sent: Tuesday, August 22, 2006 3:02 PM
To: Arturo Perez
Cc: pgsql-general@xxxxxxxxxxxxxx
Subject: Re: [GENERAL] [8.1.4] Create index on timestamp fails

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.

This should fix the issue.

Chris

On 8/21/06, Arturo Perez <aperez@xxxxxxxxxxxx> wrote:

Hi all,

Using postgresql 8.1.4....

I have a table with an column:
        entry_date | timestamp with time zone| not null

And 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 IMMUTABLE

According to the mailing lists, this has been working since 7.4.  What am I doing wrong?

tia,
arturo



[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