Re: Stable function semantics (was Re: Mislabeled timestamp functions)

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Oliver Jowett <oliver@opencloud.com>
Cc: Bruno Wolff III <bruno@wolff.to>, Gaetano Mendola <mendola@bigfoot.com>, pgsql-hackers@postgresql.org
Date: 2004-10-03T21:27:25Z
Lists: pgsql-hackers, pgsql-novice, pgsql-sql
Oliver Jowett <oliver@opencloud.com> 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