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 6D15CD1B554 for ; Thu, 9 Oct 2003 18:43:01 +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 93178-09 for ; Thu, 9 Oct 2003 15:42:12 -0300 (ADT) Received: from smtp.noos.fr (nan-smtp-13.noos.net [212.198.2.121]) by svr1.postgresql.org (Postfix) with ESMTP id CD8A1D1B577 for ; Thu, 9 Oct 2003 15:42:10 -0300 (ADT) Received: (qmail 22477 invoked by uid 0); 9 Oct 2003 18:42:00 -0000 Received: from unknown (HELO bigfoot.com) ([::ffff:212.198.37.110]) (envelope-sender ) by ::ffff:212.198.2.121 (qmail-ldap-1.03) with SMTP for ; 9 Oct 2003 18:42:00 -0000 Message-ID: <3F858FCE.3040907@bigfoot.com> Date: Thu, 09 Oct 2003 18:41:50 +0200 From: Gaetano Mendola User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5b) Gecko/20030901 Thunderbird/0.2 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "pgsql-performance@postgresql.org" Cc: Andriy Tkachuk Subject: Re: IMMUTABLE function's flag do not work: 7.3.4, plpgsql References: <5442.1065651752@sss.pgh.pa.us> <20031009101121.S29282-100000@pool.imt.com.ua> In-Reply-To: <20031009101121.S29282-100000@pool.imt.com.ua> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/298 X-Sequence-Number: 4046 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. Regards Gaetano Mendola