Neil Conway <neilc(at)samurai(dot)com> writes:
> You would have to try *pretty hard* just to know that it existed. And
> even if you decided to use it in an application, it won't take much more
> than grepping for 'oidrand' and replacing it with 'random() < 1.0/y' in
> order to upgrade to 7.4.
Or you could do
CREATE FUNCTION oidrand(oid, int) RETURNS bool AS
'SELECT random() < 1.0/$2' LANGUAGE sql;
regards, tom lane