Re: date is not immutable ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Gaetano Mendola" <mendola(at)bigfoot(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: date is not immutable ?
Date: 2003-03-12 21:46:58
Message-ID: 29517.1047505618@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"Gaetano Mendola" <mendola(at)bigfoot(dot)com> writes:
> I'm trying to create an index on a timestamptz field just extracting the
> date:
> # create index idx_user_logs_login_time_date on user_logs (
> date(login_time) );
> ERROR: DefineIndex: index function must be marked IMMUTABLE

> why date is not marked immutable ?

Because the conversion depends on your timezone setting.

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message P G 2003-03-12 21:50:40 I cannot get the db to initialize. Please help.
Previous Message Bruce Momjian 2003-03-12 21:40:31 Re: OOT-Does PostgreSQL has commercial level.