Re: 8.2.4 Won't Build 8.1 Functional Indexes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Chris Hoover <revoohc(at)gmail(dot)com>, "pgsql-admin(at)postgresql(dot)org Admin" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: 8.2.4 Won't Build 8.1 Functional Indexes
Date: 2007-06-06 23:41:26
Message-ID: 17138.1181173286@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Alvaro Herrera <alvherre(at)commandprompt(dot)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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Peter Koczan 2007-06-07 00:51:15 Re: troubleshooting "idle in transaction"
Previous Message Raul Retamozo 2007-06-06 23:09:03 copying data into another database ? (replication)