PostgreSQL Source Code: src/interfaces/ecpg/test/expected/thread-prep.c Source File (original) (raw)
1
2
6
7#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
8
9#line 1 "prep.pgc"
10#include <stdint.h>
11#include <stdlib.h>
12#include "ecpg_config.h"
13
14#ifdef WIN32
15#define WIN32_LEAN_AND_MEAN
16#include <windows.h>
17#include <process.h>
18#include <locale.h>
19#else
20#include <pthread.h>
21#endif
22#include <stdio.h>
23
24#define THREADS 16
25#define REPEATS 50
26
27
28#line 1 "sqlca.h"
29#ifndef POSTGRES_SQLCA_H
30#define POSTGRES_SQLCA_H
31
32#ifndef PGDLLIMPORT
33#if defined(WIN32) || defined(__CYGWIN__)
34#define PGDLLIMPORT __declspec (dllimport)
35#else
36#define PGDLLIMPORT
37#endif
38#endif
39
40#define SQLERRMC_LEN 150
41
42#ifdef __cplusplus
43extern "C"
44{
45#endif
46
48{
52 struct
53 {
59
60
61
62
63
64
65
66
68
69
70
71
72
73
74
75
76
77
78
79
80
82};
83
85
86#ifndef POSTGRES_ECPG_INTERNAL
87#define sqlca (*ECPGget_sqlca())
88#endif
89
90#ifdef __cplusplus
91}
92#endif
93
94#endif
95
96#line 18 "prep.pgc"
97
98
99#line 1 "regression.h"
100
101
102
103
104
105
106#line 19 "prep.pgc"
107
108
109
110#line 21 "prep.pgc"
111
112
113#line 22 "prep.pgc"
114
115
116#ifdef WIN32
118#else
120#endif
121{
122 int i;
123
124
125
126
127
128
129#line 33 "prep.pgc"
131
132#line 34 "prep.pgc"
133 char name [ 100 ] ;
134
135#line 35 "prep.pgc"
136 char query [ 256 ] = "INSERT INTO T VALUES ( ? )" ;
137
138#line 36 "prep.pgc"
139
140
143
145#line 41 "prep.pgc"
146
148#line 41 "prep.pgc"
149
151#line 42 "prep.pgc"
152
154#line 42 "prep.pgc"
155
157 {
159#line 45 "prep.pgc"
160
162#line 45 "prep.pgc"
163
167#line 46 "prep.pgc"
168
170#line 46 "prep.pgc"
171
173#line 46 "prep.pgc"
174
175 }
177#line 48 "prep.pgc"
178
180#line 48 "prep.pgc"
181
183#line 49 "prep.pgc"
184
186#line 49 "prep.pgc"
187
188
189 return 0;
190}
191
193{
195#ifdef WIN32
197#else
199#endif
200
202#line 63 "prep.pgc"
203
205#line 63 "prep.pgc"
206
208#line 64 "prep.pgc"
209
211#line 64 "prep.pgc"
212
214#line 65 "prep.pgc"
215
217#line 65 "prep.pgc"
218
220#line 66 "prep.pgc"
221
223#line 66 "prep.pgc"
224
226#line 67 "prep.pgc"
227
229#line 67 "prep.pgc"
230
231
232#ifdef WIN32
234 {
235 unsigned id;
237 }
238
242#else
247#endif
248
249 return 0;
250}
bool ECPGsetcommit(int lineno, const char *mode, const char *connection_name)
bool ECPGdisconnect(int lineno, const char *connection_name)
bool ECPGconnect(int lineno, int c, const char *name, const char *user, const char *passwd, const char *connection_name, int autocommit)
bool ECPGdo(const int lineno, const int compat, const int force_indicator, const char *connection_name, const bool questionmarks, const int st, const char *query,...)
bool ECPGprepare(int lineno, const char *connection_name, const bool questionmarks, const char *name, const char *variable)
bool ECPGdeallocate(int lineno, int c, const char *connection_name, const char *name)
struct sqlca_t::@177 sqlerrm
char sqlerrmc[SQLERRMC_LEN]
static void * fn(void *arg)
struct sqlca_t * ECPGget_sqlca(void)