"David Johnston" <pol...@yahoo.com> wrote:
 
> VOLATILE: "A Volatile function used in an ORDER BY or WHERE clause
> without referencing any columns from the query itself (i.e., no
> parameters or all constants) will be evaluated a single time and
> the result treated as a constant (i.e., all rows will have
> identical values) for that part of the query."
 
I hope you're wrong about the ORDER BY part of that.  A quick test
confirms that it works in ORDER BY, at least for some cases.  If
there are any exceptions to that, I would sure like to know about
it -- and really soon.
 
select * from generate_series(1, 10000) s(n)
  order by random() limit 10;
 
-Kevin


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to