Re: 8.2.4 Won't Build 8.1 Functional Indexes - Mailing list pgsql-admin

From Tom Lane
Subject Re: 8.2.4 Won't Build 8.1 Functional Indexes
Date
Msg-id 17138.1181173286@sss.pgh.pa.us
Whole thread Raw
In response to Re: 8.2.4 Won't Build 8.1 Functional Indexes  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: 8.2.4 Won't Build 8.1 Functional Indexes  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: 8.2.4 Won't Build 8.1 Functional Indexes  ("Chris Hoover" <revoohc@gmail.com>)
List pgsql-admin
Alvaro Herrera <alvherre@commandprompt.com> writes:
> You can't do this because to_date and other functions are not immutable.
> 8.2 seems to be more picky about this -- the date conversions of
> timestamptz columns are dependent on the current timezone.

The reason 8.2 is more picky is that the function is less immutable
thanks to the addition of locale-dependent functionality:
http://archives.postgresql.org/pgsql-committers/2006-11/msg00264.php

I gather that the underlying column is timestamp without tz, or it would
never have worked in 8.1 either.  That being the case, these index
definitions seem pretty darn stupid anyway --- why aren't you just
indexing on date_trunc or a plain cast to date?

            regards, tom lane

pgsql-admin by date:

Previous
From: Raul Retamozo
Date:
Subject: copying data into another database ? (replication)
Next
From: Peter Koczan
Date:
Subject: Re: troubleshooting "idle in transaction"