]> granicus.if.org Git - postgresql/commitdiff
Remove old, broken code for query_limit(), assert_enable(),
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 22 Nov 2000 19:34:49 +0000 (19:34 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 22 Nov 2000 19:34:49 +0000 (19:34 +0000)
assert_test() functions --- these weren't accomplishing much except to
render the whole module un-loadable ...

contrib/miscutil/README.misc_utils
contrib/miscutil/misc_utils.c
contrib/miscutil/misc_utils.h
contrib/miscutil/misc_utils.sql.in

index 903455513a2533535abd223e0df478477b205e6b..0a8eca6c9c003fd5d25ebb197621d26a28c941e0 100644 (file)
@@ -4,13 +4,6 @@ Copyright (C) 1999, Massimo Dal Zotto <dz@cs.unitn.it>
 This software is distributed under the GNU General Public License
 either version 2, or (at your option) any later version.
 
-query_limit(n)
-
-       sets a limit on the maximum numbers of query returned from
-       a backend. It can be used to limit the result size retrieved
-       by the application for poor input data or to avoid accidental
-       table product while playying with sql.
 backend_pid()
 
        return the pid of our corresponding backend.
@@ -27,17 +20,7 @@ unlisten(relname)
 min(x,y)
 max(x,y)
 
-       return the min or max bteween two integers.
-
-assert_enable(bool)
-
-       enable/disable assert checkings in the backend, if it has been
-       compiled with USE_ASSERT_CHECKING.
-
-assert_test(bool)
-
-       test the assert enable/disable code, if the backend has been
-       compiled with ASSERT_CHECKING_TEST.
+       return the min or max of two integers.
 
 -- 
 Massimo Dal Zotto <dz@cs.unitn.it>
index e7949d32aa6da3d591fc80a074752cbe726b95c6..0779fcc1fcc1286d6ddc6656bb78af3727f9bb49 100644 (file)
@@ -9,13 +9,13 @@
  * either version 2, or (at your option) any later version.
  */
 
+#include "postgres.h"
+
 #include <unistd.h>
 #include <signal.h>
 #include <string.h>
 #include <errno.h>
 
-#include "postgres.h"
-
 #include "access/heapam.h"
 #include "access/htup.h"
 #include "access/relscan.h"
@@ -23,6 +23,7 @@
 #include "access/tupdesc.h"
 #include "catalog/catname.h"
 #include "catalog/pg_listener.h"
+#include "commands/async.h"
 #include "fmgr.h"
 #include "storage/lmgr.h"
 #include "utils/fmgroids.h"
 #undef MIN
 #define MIN(x,y)       ((x)<=(y) ? (x) : (y))
 
-extern int     ExecutorLimit(int limit);
-extern void Async_Unlisten(char *relname, int pid);
-extern int     assertTest(int val);
-
-#ifdef ASSERT_CHECKING_TEST
-extern int     assertEnable(int val);
-
-#endif
-
-int
-query_limit(int limit)
-{
-       return ExecutorLimit(limit);
-}
 
 int
 backend_pid()
@@ -128,22 +115,6 @@ active_listeners(text *relname)
        return count;
 }
 
-#ifdef USE_ASSERT_CHECKING
-int
-assert_enable(int val)
-{
-       return assertEnable(val);
-}
-
-#ifdef ASSERT_CHECKING_TEST
-int
-assert_test(int val)
-{
-       return assertTest(val);
-}
-
-#endif
-#endif
 
 /* end of file */
 
index 080f1147a887753f5fb2ab51667b213b086ccf53..f4577f49de402142bb829babe4160364ee0b4869 100644 (file)
@@ -1,28 +1,10 @@
 #ifndef MISC_UTILS_H
 #define MISC_UTILS_H
 
-int                    query_limit(int limit);
 int                    backend_pid(void);
 int                    unlisten(char *relname);
 int                    max(int x, int y);
 int                    min(int x, int y);
 int                    active_listeners(text *relname);
 
-#ifdef USE_ASSERT_CHECKING
-int                    assert_enable(int val);
-
-#ifdef ASSERT_CHECKING_TEST
-int                    assert_test(int val);
-
-#endif
 #endif
-
-#endif
-
-/*
- * Local Variables:
- *     tab-width: 4
- *     c-indent-level: 4
- *     c-basic-offset: 4
- * End:
- */
index a0418898c61f2d9f05b61c76fdf2c5ef1650ac57..39d4fd51e9b128b5c621a4ddf58af863239042e6 100644 (file)
@@ -7,12 +7,6 @@
 -- This file is distributed under the GNU General Public License
 -- either version 2, or (at your option) any later version.
 
--- Set the maximum number of tuples returned by a single query.
---
-create function query_limit(int4) returns int4
-  as 'MODULE_PATHNAME'
-  language 'C';
-
 -- Return the pid of the backend.
 --
 create function backend_pid() returns int4
@@ -49,16 +43,4 @@ create function active_listeners(text) returns int4
   as 'MODULE_PATHNAME'
   language 'C';
 
--- Enable/disable Postgres assert checking.
---
-create function assert_enable(int4) returns int4
-  as 'MODULE_PATHNAME'
-  language 'C';
-
--- Test Postgres assert checking.
---
--- create function assert_test(int4) returns int4
---   as 'MODULE_PATHNAME'
---   language 'C';
-
 -- end of file