"David Johnston" <polobo@yahoo.com> wrote:
>> | VOLATILE indicates that the function value can change even
>> | within a single table scan, so no optimizations can be made.
>> | Relatively few database functions are volatile in this sense;
>> | some examples are random(), [...]
> What are the arguments against adding a 4th identifier - call it
> PER_ROW for this argument? The main reason VOLATILE is broken is
> that it is the default and in order to minimize beginner's penalty
> it is not treated as such in some situations. The new one could
> behave just like VOLATILE but would never be optimized away and
> would always evaluate once for each row in its context.
So how would you document that? It sounds like the proposed level
would behave exactly as the VOLATILE level is currently documented
to behave; so I guess we could shift the documentation of VOLATILE
to PER_ROW (or whatever). How would you then describe the behavior
of VOLATILE?
-Kevin