File tree 4 files changed +4
-86
lines changed
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>
4
4
This software is distributed under the GNU General Public License
5
5
either version 2, or (at your option) any later version.
6
6
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
-
14
7
backend_pid()
15
8
16
9
return the pid of our corresponding backend.
@@ -27,17 +20,7 @@ unlisten(relname)
27
20
min(x,y)
28
21
max(x,y)
29
22
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.
41
24
42
25
--
43
26
Massimo Dal Zotto <dz@cs.unitn.it>
Original file line number Diff line number Diff line change 9
9
* either version 2, or (at your option) any later version.
10
10
*/
11
11
12
+ #include "postgres.h"
13
+
12
14
#include <unistd.h>
13
15
#include <signal.h>
14
16
#include <string.h>
15
17
#include <errno.h>
16
18
17
- #include "postgres.h"
18
-
19
19
#include "access/heapam.h"
20
20
#include "access/htup.h"
21
21
#include "access/relscan.h"
22
22
#include "access/skey.h"
23
23
#include "access/tupdesc.h"
24
24
#include "catalog/catname.h"
25
25
#include "catalog/pg_listener.h"
26
+ #include "commands/async.h"
26
27
#include "fmgr.h"
27
28
#include "storage/lmgr.h"
28
29
#include "utils/fmgroids.h"
35
36
#undef MIN
36
37
#define MIN (x ,y ) ((x)<=(y) ? (x) : (y))
37
38
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
- }
52
39
53
40
int
54
41
backend_pid ()
@@ -128,22 +115,6 @@ active_listeners(text *relname)
128
115
return count ;
129
116
}
130
117
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
147
118
148
119
/* end of file */
149
120
Original file line number Diff line number Diff line change 1
1
#ifndef MISC_UTILS_H
2
2
#define MISC_UTILS_H
3
3
4
- int query_limit (int limit );
5
4
int backend_pid (void );
6
5
int unlisten (char * relname );
7
6
int max (int x , int y );
8
7
int min (int x , int y );
9
8
int active_listeners (text * relname );
10
9
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
18
10
#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 7
7
-- This file is distributed under the GNU General Public License
8
8
-- either version 2, or (at your option) any later version.
9
9
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
-
16
10
-- Return the pid of the backend.
17
11
--
18
12
create function backend_pid() returns int4
@@ -49,16 +43,4 @@ create function active_listeners(text) returns int4
49
43
as 'MODULE_PATHNAME'
50
44
language 'C';
51
45
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
-
64
46
-- end of file
You can’t perform that action at this time.
0 commit comments