Commit Graph

6 Commits

Author SHA1 Message Date
Peter Eisentraut 3f11971916 Remove extra newlines at end and beginning of files, add missing newlines
at end of files.
2010-08-19 05:57:36 +00:00
Bruce Momjian 6812e95a28 Improve random regression tests to fail less frequently. 2004-03-15 15:46:25 +00:00
Bruce Momjian 6cb1f4fe44 The "random" regression test uses a function called oidrand(), which
takes two parameters, an OID x and an integer y, and returns "true" with
probability 1/y (the OID argument is ignored). This can be useful -- for
example, it can be used to select a random sampling of the rows in a
table (which is what the "random" regression test uses it for).

This patch removes that function, because it was old and messy. The old
function had the following problems:

- it was undocumented

- it was poorly named

- it was designed to workaround an optimizer bug that no longer exists
(the OID argument is to ensure that the optimizer won't optimize away
calls to the function; AFAIK marking the function as 'volatile' suffices
nowadays)

- it used a different random-number generation technique than the other
PSRNG-related functions in the backend do (it called random() like they
do, but it had its own logic for setting a set and deciding when to
reseed the RNG).

Ok, this patch removes oidrand(), oidsrand(), and userfntest(), and
improves the SGML docs a little bit (un-commenting the setseed()
documentation).

Neil Conway
2003-02-13 05:24:04 +00:00
Thomas G. Lockhart d1e6368816 Clean up header for uniform appearance throughout tests. 2000-01-06 06:41:55 +00:00
Thomas G. Lockhart 620c2c362f Update the random test so it should succeed most of the time.
Instead of directly showing the random results, test the results
 for the expected behavior (range and randomness).
1998-08-17 16:11:35 +00:00
Marc G. Fournier a426ff583d There, I'll leave this alone until Thomas catchs up *grin* 1997-04-27 18:13:54 +00:00