X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id E6F8ED1B55E for ; Fri, 10 Oct 2003 07:17:23 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 52462-04 for ; Fri, 10 Oct 2003 04:16:35 -0300 (ADT) Received: from pool.imt.com.ua (office.imt.com.ua [212.109.53.33]) by svr1.postgresql.org (Postfix) with ESMTP id B44C1D1B54E for ; Fri, 10 Oct 2003 04:16:25 -0300 (ADT) Received: from pool.imt.com.ua (localhost [127.0.0.1]) by pool.imt.com.ua (8.12.8p2/8.12.8) with ESMTP id h9A7Fm4r036103; Fri, 10 Oct 2003 10:15:48 +0300 (EEST) (envelope-from ant@imt.com.ua) Received: from localhost (ant@localhost) by pool.imt.com.ua (8.12.8p2/8.12.8/Submit) with ESMTP id h9A7Fld0036099; Fri, 10 Oct 2003 10:15:48 +0300 (EEST) (envelope-from ant@imt.com.ua) Date: Fri, 10 Oct 2003 10:15:47 +0300 (EEST) From: Andriy Tkachuk To: Gaetano Mendola Cc: "pgsql-performance@postgresql.org" Subject: Re: IMMUTABLE function's flag do not work: 7.3.4, plpgsql In-Reply-To: <3F858FCE.3040907@bigfoot.com> Message-ID: <20031010101408.G35607-100000@pool.imt.com.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/323 X-Sequence-Number: 4071 On Thu, 9 Oct 2003, Gaetano Mendola wrote: > Andriy Tkachuk wrote: > > On Wed, 8 Oct 2003, Tom Lane wrote: > > > > > >>Andriy Tkachuk writes: > >> > >>>At second. calc_total() is immutable function: > >>>but it seems that it's not cached in one session: > >> > >>It's not supposed to be. > > > > > > but it's written id doc: > > > > IMMUTABLE indicates that the function always returns the same > > result when given the same argument values; that is, it does not > > do database lookups or otherwise use information not directly > > present in its parameter list. If this option is given, any call > > of the function with all-constant arguments can be immediately > > replaced with the function value. > > The doc say "can be" not must and will be. ok, but on what it depends on? thanks, andriy http://www.imt.com.ua