aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2003-02-13 05:24:04 +0000
committerBruce Momjian <bruce@momjian.us>2003-02-13 05:24:04 +0000
commit6cb1f4fe44a92aa97fbfd0c26ebbb8842349d90d (patch)
tree228d6d973ec607fe0c171319b84b9d8cfd10fd58 /src/include
parent8195f8f0427e0387f595ca951e4dcc257655e891 (diff)
downloadpostgresql-6cb1f4fe44a92aa97fbfd0c26ebbb8842349d90d.tar.gz
postgresql-6cb1f4fe44a92aa97fbfd0c26ebbb8842349d90d.zip
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
Diffstat (limited to 'src/include')
-rw-r--r--src/include/catalog/catversion.h4
-rw-r--r--src/include/catalog/pg_proc.h8
-rw-r--r--src/include/utils/builtins.h5
3 files changed, 4 insertions, 13 deletions
diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h
index df4347633f2..230f1e277ac 100644
--- a/src/include/catalog/catversion.h
+++ b/src/include/catalog/catversion.h
@@ -37,7 +37,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: catversion.h,v 1.175 2003/02/03 21:15:44 tgl Exp $
+ * $Id: catversion.h,v 1.176 2003/02/13 05:24:02 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -53,6 +53,6 @@
*/
/* yyyymmddN */
-#define CATALOG_VERSION_NO 200302031
+#define CATALOG_VERSION_NO 200302131
#endif
diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h
index d7b13a762eb..f32715284b0 100644
--- a/src/include/catalog/pg_proc.h
+++ b/src/include/catalog/pg_proc.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: pg_proc.h,v 1.282 2003/01/28 22:13:36 tgl Exp $
+ * $Id: pg_proc.h,v 1.283 2003/02/13 05:24:02 momjian Exp $
*
* NOTES
* The script catalog/genbki.sh reads this file and generates .bki
@@ -944,12 +944,6 @@ DESCR("greater-than");
/* OIDS 700 - 799 */
DATA(insert OID = 710 ( getpgusername PGNSP PGUID 12 f f t f s 0 19 "" current_user - _null_ ));
DESCR("deprecated -- use current_user");
-DATA(insert OID = 711 ( userfntest PGNSP PGUID 12 f f t f i 1 23 "23" userfntest - _null_ ));
-DESCR("");
-DATA(insert OID = 713 ( oidrand PGNSP PGUID 12 f f t f v 2 16 "26 23" oidrand - _null_ ));
-DESCR("random");
-DATA(insert OID = 715 ( oidsrand PGNSP PGUID 12 f f t f v 1 16 "23" oidsrand - _null_ ));
-DESCR("seed random number generator");
DATA(insert OID = 716 ( oidlt PGNSP PGUID 12 f f t f i 2 16 "26 26" oidlt - _null_ ));
DESCR("less-than");
DATA(insert OID = 717 ( oidle PGNSP PGUID 12 f f t f i 2 16 "26 26" oidle - _null_ ));
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 */