File tree Expand file tree Collapse file tree 4 files changed +4
-86
lines changed Expand file tree Collapse file tree 4 files changed +4
-86
lines changed Original file line number Diff line number Diff line change @@ -4,13 +4,6 @@ Copyright (C) 1999, Massimo Dal Zotto <dz@cs.unitn.it>
44This software is distributed under the GNU General Public License
55either version 2, or (at your option) any later version.
66
7- query_limit(n)
8-
9- sets a limit on the maximum numbers of query returned from
10- a backend. It can be used to limit the result size retrieved
11- by the application for poor input data or to avoid accidental
12- table product while playying with sql.
13-
147backend_pid()
158
169 return the pid of our corresponding backend.
@@ -27,17 +20,7 @@ unlisten(relname)
2720min(x,y)
2821max(x,y)
2922
30- return the min or max bteween two integers.
31-
32- assert_enable(bool)
33-
34- enable/disable assert checkings in the backend, if it has been
35- compiled with USE_ASSERT_CHECKING.
36-
37- assert_test(bool)
38-
39- test the assert enable/disable code, if the backend has been
40- compiled with ASSERT_CHECKING_TEST.
23+ return the min or max of two integers.
4124
4225--
4326Massimo Dal Zotto <dz@cs.unitn.it>
Original file line number Diff line number Diff line change 99 * either version 2, or (at your option) any later version.
1010 */
1111
12+ #include "postgres.h"
13+
1214#include <unistd.h>
1315#include <signal.h>
1416#include <string.h>
1517#include <errno.h>
1618
17- #include "postgres.h"
18-
1919#include "access/heapam.h"
2020#include "access/htup.h"
2121#include "access/relscan.h"
2222#include "access/skey.h"
2323#include "access/tupdesc.h"
2424#include "catalog/catname.h"
2525#include "catalog/pg_listener.h"
26+ #include "commands/async.h"
2627#include "fmgr.h"
2728#include "storage/lmgr.h"
2829#include "utils/fmgroids.h"
3536#undef MIN
3637#define MIN (x ,y ) ((x)<=(y) ? (x) : (y))
3738
38- extern int ExecutorLimit (int limit );
39- extern void Async_Unlisten (char * relname , int pid );
40- extern int assertTest (int val );
41-
42- #ifdef ASSERT_CHECKING_TEST
43- extern int assertEnable (int val );
44-
45- #endif
46-
47- int
48- query_limit (int limit )
49- {
50- return ExecutorLimit (limit );
51- }
5239
5340int
5441backend_pid ()
@@ -128,22 +115,6 @@ active_listeners(text *relname)
128115 return count ;
129116}
130117
131- #ifdef USE_ASSERT_CHECKING
132- int
133- assert_enable (int val )
134- {
135- return assertEnable (val );
136- }
137-
138- #ifdef ASSERT_CHECKING_TEST
139- int
140- assert_test (int val )
141- {
142- return assertTest (val );
143- }
144-
145- #endif
146- #endif
147118
148119/* end of file */
149120
Original file line number Diff line number Diff line change 11#ifndef MISC_UTILS_H
22#define MISC_UTILS_H
33
4- int query_limit (int limit );
54int backend_pid (void );
65int unlisten (char * relname );
76int max (int x , int y );
87int min (int x , int y );
98int active_listeners (text * relname );
109
11- #ifdef USE_ASSERT_CHECKING
12- int assert_enable (int val );
13-
14- #ifdef ASSERT_CHECKING_TEST
15- int assert_test (int val );
16-
17- #endif
1810#endif
19-
20- #endif
21-
22- /*
23- * Local Variables:
24- * tab-width: 4
25- * c-indent-level: 4
26- * c-basic-offset: 4
27- * End:
28- */
Original file line number Diff line number Diff line change 77-- This file is distributed under the GNU General Public License
88-- either version 2, or (at your option) any later version.
99
10- -- Set the maximum number of tuples returned by a single query.
11- --
12- create function query_limit(int4) returns int4
13- as 'MODULE_PATHNAME'
14- language 'C';
15-
1610-- Return the pid of the backend.
1711--
1812create function backend_pid() returns int4
@@ -49,16 +43,4 @@ create function active_listeners(text) returns int4
4943 as 'MODULE_PATHNAME'
5044 language 'C';
5145
52- -- Enable/disable Postgres assert checking.
53- --
54- create function assert_enable(int4) returns int4
55- as 'MODULE_PATHNAME'
56- language 'C';
57-
58- -- Test Postgres assert checking.
59- --
60- -- create function assert_test(int4) returns int4
61- -- as 'MODULE_PATHNAME'
62- -- language 'C';
63-
6446-- end of file
You can’t perform that action at this time.
0 commit comments