Tom Lane wrote:
> Don Baccus <dhogaza@pacifier.com> writes:
>
>>Maybe the behavior's implementation defined ... if not, I'd presume SQL3
>> states that a function in the above context is called either once per
>>row or once per query, not sometimes one or sometimes the other.
> It looks to me like the spec does NOT attempt to nail down the behavior
> of non-deterministic functions; in the places where they talk about
> non-deterministic functions at all, it's mostly to forbid their use in
> contexts where nondeterminism would affect the final result. Otherwise
> the results are implementation-defined.
Thanks ... I wasn't trying to lobby for a change, I just wanted to make
sure that the standard stated that the behavior is implementation
defined or otherwise punted on the issue before my example was written
off as a non-bug.
At some point the non-deterministic behavior of non-deterministic
functions called in subselects in the target list should probably be
documented, no? Most language standards - at least the ones I've worked
on - require compliant implementations to define and document
implementation-defined behavior ...
Maybe a warning would be appropriate, too?
I realize both of the above would rank pretty low in priority on the
todo list ...
--
Don Baccus
Portland, OR
http://donb.photo.net, http://birdnotes.net, http://openacs.org