X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id F3CDC329E23 for ; Sun, 3 Oct 2004 22:27:43 +0100 (BST) 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 63531-07 for ; Sun, 3 Oct 2004 21:27:33 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 6FF4E329F7A for ; Sun, 3 Oct 2004 22:27:34 +0100 (BST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id i93LRPLD007888; Sun, 3 Oct 2004 17:27:25 -0400 (EDT) To: Oliver Jowett Cc: Bruno Wolff III , Gaetano Mendola , pgsql-hackers@postgresql.org Subject: Re: Stable function semantics (was Re: Mislabeled timestamp functions) In-reply-to: <41606778.7090302@opencloud.com> References: <20041001182830.GA20624@wolff.to> <13492.1096656574@sss.pgh.pa.us> <15677.1096671183@sss.pgh.pa.us> <415E6A15.1090105@bigfoot.com> <20041002200451.GA14830@wolff.to> <20041003011641.GB19221@wolff.to> <41606778.7090302@opencloud.com> Comments: In-reply-to Oliver Jowett message dated "Mon, 04 Oct 2004 09:56:24 +1300" Date: Sun, 03 Oct 2004 17:27:25 -0400 Message-ID: <7887.1096838845@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: 200410/62 X-Sequence-Number: 59565 Oliver Jowett writes: > Bruno Wolff III wrote: >> I should have said within a single statement instead of within a single >> transaction. > As I understand Tom's earlier explanation of this, the definition is > even more narrow: stable functions only need to return the same value > across a single tablescan. > It might be useful to have some variant of stable (or perhaps just a > change in semantics) such that the function returns the same value for > identical parameters until the next CommandCounterIncrement. In practice I think these are equivalent definitions. regards, tom lane