Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 6B5379FB4C2 for ; Wed, 6 Jun 2007 20:41:34 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 31546-06 for ; Wed, 6 Jun 2007 20:41:19 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 82AC19FB443 for ; Wed, 6 Jun 2007 20:41:29 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l56NfQg2017139; Wed, 6 Jun 2007 19:41:26 -0400 (EDT) To: Alvaro Herrera cc: Chris Hoover , "pgsql-admin@postgresql.org Admin" Subject: Re: 8.2.4 Won't Build 8.1 Functional Indexes In-reply-to: <20070606195459.GH11800@alvh.no-ip.org> References: <1d219a6f0706061112p355fc6cexb30a6b4b4bf187c3@mail.gmail.com> <20070606195459.GH11800@alvh.no-ip.org> Comments: In-reply-to Alvaro Herrera message dated "Wed, 06 Jun 2007 15:54:59 -0400" Date: Wed, 06 Jun 2007 19:41:26 -0400 Message-ID: <17138.1181173286@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/52 X-Sequence-Number: 25720 Alvaro Herrera 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