mirror of
https://github.com/postgres/postgres.git
synced 2026-02-20 16:30:40 -05:00
12 lines
299 B
SQL
12 lines
299 B
SQL
--
|
|
-- test the random function
|
|
--
|
|
-- count the number of tuples originally
|
|
SELECT count(*) FROM onek;
|
|
|
|
-- select roughly 1/10 of the tuples
|
|
SELECT count(*) FROM onek where oidrand(onek.oid, 10);
|
|
|
|
-- select again, the count should be different
|
|
SELECT count(*) FROM onek where oidrand(onek.oid, 10);
|
|
|