diff options
Diffstat (limited to 'contrib/miscutil')
-rw-r--r-- | contrib/miscutil/README.misc_utils | 19 | ||||
-rw-r--r-- | contrib/miscutil/misc_utils.c | 35 | ||||
-rw-r--r-- | contrib/miscutil/misc_utils.h | 18 | ||||
-rw-r--r-- | contrib/miscutil/misc_utils.sql.in | 18 |
4 files changed, 4 insertions, 86 deletions
diff --git a/contrib/miscutil/README.misc_utils b/contrib/miscutil/README.misc_utils index 903455513a..0a8eca6c9c 100644 --- a/contrib/miscutil/README.misc_utils +++ b/contrib/miscutil/README.misc_utils @@ -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> diff --git a/contrib/miscutil/misc_utils.c b/contrib/miscutil/misc_utils.c index e7949d32aa..0779fcc1fc 100644 --- a/contrib/miscutil/misc_utils.c +++ b/contrib/miscutil/misc_utils.c @@ -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" @@ -35,20 +36,6 @@ #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 */ diff --git a/contrib/miscutil/misc_utils.h b/contrib/miscutil/misc_utils.h index 080f1147a8..f4577f49de 100644 --- a/contrib/miscutil/misc_utils.h +++ b/contrib/miscutil/misc_utils.h @@ -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: - */ diff --git a/contrib/miscutil/misc_utils.sql.in b/contrib/miscutil/misc_utils.sql.in index a0418898c6..39d4fd51e9 100644 --- a/contrib/miscutil/misc_utils.sql.in +++ b/contrib/miscutil/misc_utils.sql.in @@ -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 |