"Kevin Grittner" <Kevin.Grittner@wicourts.gov> wrote:
> There is a workaround, if you don't mind ugly:
Or, better:
WITH source AS ( SELECT i, random() AS r FROM generate_series(1,10) AS i
)
SELECT i
FROM source, ( SELECT count(*) AS _n FROM source ) AS _stats
WHERE r < 5::DOUBLE PRECISION/_n;
-Kevin