On Mon, 7 Feb 2000, Tom Lane wrote:
> Well, it's not a bug --- it was an entirely deliberate change. It
> might be a misfeature though. The case we were concerned about was
>
> select distinct x from foo order by y;
>
> which produces ill-defined results.
Okay, I can understand this...
> select distinct sin(x) from foo order by abs(sin(x));
>
> select distinct random(x) from foo order by abs(random(x));
The thing here is that random() is not deterministic on its inputs,
whereas sin() is. Perhaps we should only allow fully deterministic ORDER
BY? (Ugh, another flag for functions...)
Taral