Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 5AAD91337BFE for ; Tue, 15 Mar 2011 05:12:28 -0300 (ADT) 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 91314-08 for ; Tue, 15 Mar 2011 08:12:18 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.csc.lt (mail.csc.lt [193.138.191.5]) by mail.postgresql.org (Postfix) with ESMTP id 33B5C1337BD1 for ; Tue, 15 Mar 2011 05:12:16 -0300 (ADT) Received: (qmail 23311 invoked by uid 210); 15 Mar 2011 08:12:16 -0000 Received: from mail.nsoft.lt by mail (envelope-from , uid 201) with qmail-scanner-2.05st (clamdscan: 0.97/12838. spamassassin: 3.2.1. perlscan: 2.05st. Clear:RC:1(77.240.249.53):. Processed in 0.0182290000000001 secs); 15 Mar 2011 08:12:16 -0000 Received: from mail.nsoft.lt (77.240.249.53) by mail.csc.lt with SMTP; 15 Mar 2011 08:12:15 -0000 Received: from [192.168.16.113] (unknown [77.240.249.53]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.nsoft.lt (Postfix) with ESMTPS id B8FD28E073 for ; Tue, 15 Mar 2011 10:12:13 +0200 (EET) Message-ID: <4D7F1F5D.4010709@nsoft.lt> Date: Tue, 15 Mar 2011 10:12:13 +0200 From: Julius Tuskenis Organization: UAB nSoft User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; lt-LT; rv:1.9.2.15) Gecko/20110303 Lightning/1.0b2 Thunderbird/3.1.9 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: unexpected stable function behavior References: <4D78FB98.7090609@nsoft.lt> <4D7DD5CF.4080502@nsoft.lt> <12872.1300123053@sss.pgh.pa.us> In-Reply-To: <12872.1300123053@sss.pgh.pa.us> Content-Type: multipart/alternative; boundary="------------020002050906090102020801" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.899 tagged_above=-10 required=5 tests=BAYES_00=-1.9, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 201103/151 X-Sequence-Number: 42830 This is a multi-part message in MIME format. --------------020002050906090102020801 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Thank you, Tom for you answer 2011.03.14 19:17, Tom Lane rašė: > That function property*allows* the optimizer to > invoke the function fewer times than would happen in an un-optimized > query. It does not*require* it to do so. Thank you for clearing that for me. I think these 2 sentences in documentation (http://www.postgresql.org/docs/current/interactive/xfunc-volatility.html) would prevent misunderstandings in the future. -- Julius Tuskenis Programavimo skyriaus vadovas UAB nSoft mob. +37068233050 --------------020002050906090102020801 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit Thank you, Tom for you answer

2011.03.14 19:17, Tom Lane rašė:
That function property *allows* the optimizer to
invoke the function fewer times than would happen in an un-optimized
query.  It does not *require* it to do so.
Thank you for clearing that for me. I think these 2 sentences in documentation (http://www.postgresql.org/docs/current/interactive/xfunc-volatility.html) would prevent misunderstandings in the future.

-- 
Julius Tuskenis
Programavimo skyriaus vadovas
UAB nSoft
mob. +37068233050
--------------020002050906090102020801--