X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 77B93D1E15B for ; Fri, 20 Feb 2004 16:48:41 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 41443-05 for ; Fri, 20 Feb 2004 12:48:28 -0400 (AST) Received: from internet.potentialtech.com (h-66-167-251-6.PHLAPAFG.covad.net [66.167.251.6]) by svr1.postgresql.org (Postfix) with ESMTP id 65E0DD1D570 for ; Fri, 20 Feb 2004 12:48:28 -0400 (AST) Received: from potentialtech.com (pa-plum1c-102.pit.adelphia.net [24.53.179.102]) by internet.potentialtech.com (Postfix) with ESMTP id 0C35469A71 for ; Fri, 20 Feb 2004 11:48:27 -0500 (EST) Message-ID: <40363A58.5020609@potentialtech.com> Date: Fri, 20 Feb 2004 11:48:24 -0500 From: Bill Moran User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20031005 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: cacheable stored functions? References: <40362944.2060809@potentialtech.com> <200402201601.28789.dev@archonet.com> In-Reply-To: <200402201601.28789.dev@archonet.com> 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: 200402/240 X-Sequence-Number: 5764 Richard Huxton wrote: > On Friday 20 February 2004 15:35, Bill Moran wrote: > >>I'm converting a SQL application to PostgreSQL. The majority of the logic >>in this application is in the stored functions in the database. >> >>Somewhere, I saw a reference to "WITH (iscachable)" for stored functions, >>looking again, I'm unable to find any reference to this directive. I have >>a single function that is _obviously_ safe to cache using this, and it >>generates no errors or problems that I can see. >> >>Now I'm looking at a lot of other functions that, if cached, would speed >>up performance considerably. Yet I'm reluctant to use this directive >>since I can't find documentation on it anywhere. > >>From memory, "iscachable" was replaced in version 7.3 by the three > finer-grained settings IMMUTABLE, STABLE, VOLATILE. > > I'm guessing the old behaviour is still there for backwards compatibility, but > it's probably best to use the new versions. Thanks to everyone who replied (with more or less the same answer ;) This has explained away my confusion, and I now have a reference to read. -- Bill Moran Potential Technologies http://www.potentialtech.com