X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id C3FE8D1B179 for ; Wed, 21 Jul 2004 11:45:56 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 73962-06 for ; Wed, 21 Jul 2004 14:45:38 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 3BA49D1B17B for ; Wed, 21 Jul 2004 11:45:32 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i6LEjYYY008579; Wed, 21 Jul 2004 10:45:34 -0400 (EDT) To: Markus Bertheau Cc: pgsql-sql@postgresql.org Subject: Re: immutable function calling stable function In-reply-to: <1090418677.3239.23.camel@dicaprio.akademie1.de> References: <1090418677.3239.23.camel@dicaprio.akademie1.de> Comments: In-reply-to Markus Bertheau message dated "Wed, 21 Jul 2004 16:04:37 +0200" Date: Wed, 21 Jul 2004 10:45:34 -0400 Message-ID: <8578.1090421134@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/153 X-Sequence-Number: 18405 Markus Bertheau writes: > shouldn't it be illegal for an immutable function to call a stable one? No, because that's the standard hack for getting around it when you wish to call a stable function in what you know to be a "safe" way. If you look in the archives you'll find cases where creating an immutable wrapper function was the recommended solution to performance problems. regards, tom lane