Hello Tom,
The attached patch fixes some of the underlying problems reported by
delaying the :var to $1 substitution to the last possible moments, so that
what variables are actually defined is known. PREPARE-ing is also delayed
to after these substitutions are done.
It requires a mutex aro
I'll look into it. Thanks for the analysis and CC-ing.
--
Fabien.
I am aware of 2 ways to select a random row from a table:
1) select * from table_name order by random() limit 1;
-- terribly inefficient
2) select * from table_name tablesample system_rows(1) limit 1;
-- only works on tables, not views or subqueries
Is there an option that