From 6cb1f4fe44a92aa97fbfd0c26ebbb8842349d90d Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Thu, 13 Feb 2003 05:24:04 +0000 Subject: 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 --- src/include/utils/builtins.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/include/utils/builtins.h') diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h index df20f4ad499..e956f54fef6 100644 --- a/src/include/utils/builtins.h +++ b/src/include/utils/builtins.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: builtins.h,v 1.207 2003/02/06 20:25:33 tgl Exp $ + * $Id: builtins.h,v 1.208 2003/02/13 05:24:04 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -315,9 +315,6 @@ extern Datum float84ge(PG_FUNCTION_ARGS); /* misc.c */ extern Datum nullvalue(PG_FUNCTION_ARGS); extern Datum nonnullvalue(PG_FUNCTION_ARGS); -extern Datum oidrand(PG_FUNCTION_ARGS); -extern Datum oidsrand(PG_FUNCTION_ARGS); -extern Datum userfntest(PG_FUNCTION_ARGS); extern Datum current_database(PG_FUNCTION_ARGS); /* not_in.c */ -- cgit v1.2.3