Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id A00711337B92 for ; Thu, 27 Jan 2011 09:26:58 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 78119-06 for ; Thu, 27 Jan 2011 13:26:52 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from depesz.com (martin.depesz.com [188.40.39.14]) by mail.postgresql.org (Postfix) with ESMTP id D52E31337B90 for ; Thu, 27 Jan 2011 09:26:50 -0400 (AST) Received: from martin.depesz.com ([188.40.39.14] helo=depesz.com) by depesz.com with esmtpa (Exim 4.69) (envelope-from ) id 1PiRs9-0005KD-Ld; Thu, 27 Jan 2011 14:26:49 +0100 Date: Thu, 27 Jan 2011 14:26:49 +0100 From: hubert depesz lubaczewski To: Oleg Cc: pgsql-bugs@postgresql.org Subject: Re: BUG #5852: Function date_trunc is not IMMUTABLE Message-ID: <20110127132649.GA15777@depesz.com> Reply-To: depesz@depesz.com References: <201101271102.p0RB2kxi071325@wwwmaster.postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201101271102.p0RB2kxi071325@wwwmaster.postgresql.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201101/223 X-Sequence-Number: 29245 On Thu, Jan 27, 2011 at 11:02:46AM +0000, Oleg wrote: > > The following bug has been logged online: > > Bug reference: 5852 > Logged by: Oleg > Email address: serovov@gmail.com > PostgreSQL version: 8.3 > Operating system: CentOS > Description: Function date_trunc is not IMMUTABLE > Details: > > Please mark function date_trunc as IMMUTABLE for using in index. it cannot be immutable. please check explanation in here: http://www.depesz.com/index.php/2010/09/09/why-is-my-index-not-being-used/ search for "immutable". Best regards, depesz -- Linkedin: http://www.linkedin.com/in/depesz / blog: http://www.depesz.com/ jid/gtalk: depesz@depesz.com / aim:depeszhdl / skype:depesz_hdl / gg:6749007