1 /* This is a generated file, edit the .stub.php file instead.
2 * Stub hash: 7966ed8575d26d934f6b292f3b13b0b6a4bf0e1e */
3
4 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_pg_connect, 0, 1, PgSql\\Connection, MAY_BE_FALSE)
5 ZEND_ARG_TYPE_INFO(0, connection_string, IS_STRING, 0)
6 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
7 ZEND_END_ARG_INFO()
8
9 #define arginfo_pg_pconnect arginfo_pg_connect
10
11 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_connect_poll, 0, 1, IS_LONG, 0)
12 ZEND_ARG_OBJ_INFO(0, connection, PgSql\\Connection, 0)
13 ZEND_END_ARG_INFO()
14
15 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_close, 0, 0, IS_TRUE, 0)
16 ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, connection, PgSql\\Connection, 1, "null")
17 ZEND_END_ARG_INFO()
18
19 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_dbname, 0, 0, IS_STRING, 0)
20 ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, connection, PgSql\\Connection, 1, "null")
21 ZEND_END_ARG_INFO()
22
23 #define arginfo_pg_last_error arginfo_pg_dbname
24
25 #define arginfo_pg_errormessage arginfo_pg_dbname
26
27 #define arginfo_pg_options arginfo_pg_dbname
28
29 #define arginfo_pg_port arginfo_pg_dbname
30
31 #define arginfo_pg_tty arginfo_pg_dbname
32
33 #define arginfo_pg_host arginfo_pg_dbname
34
35 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_version, 0, 0, IS_ARRAY, 0)
36 ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, connection, PgSql\\Connection, 1, "null")
37 ZEND_END_ARG_INFO()
38
39 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_parameter_status, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
40 ZEND_ARG_INFO(0, connection)
41 ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
42 ZEND_END_ARG_INFO()
43
44 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_ping, 0, 0, _IS_BOOL, 0)
45 ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, connection, PgSql\\Connection, 1, "null")
46 ZEND_END_ARG_INFO()
47
48 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_pg_query, 0, 1, PgSql\\Result, MAY_BE_FALSE)
49 ZEND_ARG_INFO(0, connection)
50 ZEND_ARG_TYPE_INFO(0, query, IS_STRING, 0)
51 ZEND_END_ARG_INFO()
52
53 #define arginfo_pg_exec arginfo_pg_query
54
55 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_pg_query_params, 0, 2, PgSql\\Result, MAY_BE_FALSE)
56 ZEND_ARG_INFO(0, connection)
57 ZEND_ARG_INFO(0, query)
58 ZEND_ARG_TYPE_INFO(0, params, IS_ARRAY, 0)
59 ZEND_END_ARG_INFO()
60
61 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_pg_prepare, 0, 2, PgSql\\Result, MAY_BE_FALSE)
62 ZEND_ARG_INFO(0, connection)
63 ZEND_ARG_TYPE_INFO(0, statement_name, IS_STRING, 0)
64 ZEND_ARG_TYPE_INFO(0, query, IS_STRING, 0)
65 ZEND_END_ARG_INFO()
66
67 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_pg_execute, 0, 2, PgSql\\Result, MAY_BE_FALSE)
68 ZEND_ARG_INFO(0, connection)
69 ZEND_ARG_INFO(0, statement_name)
70 ZEND_ARG_TYPE_INFO(0, params, IS_ARRAY, 0)
71 ZEND_END_ARG_INFO()
72
73 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_num_rows, 0, 1, IS_LONG, 0)
74 ZEND_ARG_OBJ_INFO(0, result, PgSql\\Result, 0)
75 ZEND_END_ARG_INFO()
76
77 #define arginfo_pg_numrows arginfo_pg_num_rows
78
79 #define arginfo_pg_num_fields arginfo_pg_num_rows
80
81 #define arginfo_pg_numfields arginfo_pg_num_rows
82
83 #define arginfo_pg_affected_rows arginfo_pg_num_rows
84
85 #define arginfo_pg_cmdtuples arginfo_pg_num_rows
86
87 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_last_notice, 0, 1, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_BOOL)
88 ZEND_ARG_OBJ_INFO(0, connection, PgSql\\Connection, 0)
89 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "PGSQL_NOTICE_LAST")
90 ZEND_END_ARG_INFO()
91
92 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_field_table, 0, 2, MAY_BE_STRING|MAY_BE_LONG|MAY_BE_FALSE)
93 ZEND_ARG_OBJ_INFO(0, result, PgSql\\Result, 0)
94 ZEND_ARG_TYPE_INFO(0, field, IS_LONG, 0)
95 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, oid_only, _IS_BOOL, 0, "false")
96 ZEND_END_ARG_INFO()
97
98 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_field_name, 0, 2, IS_STRING, 0)
99 ZEND_ARG_OBJ_INFO(0, result, PgSql\\Result, 0)
100 ZEND_ARG_TYPE_INFO(0, field, IS_LONG, 0)
101 ZEND_END_ARG_INFO()
102
103 #define arginfo_pg_fieldname arginfo_pg_field_name
104
105 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_field_size, 0, 2, IS_LONG, 0)
106 ZEND_ARG_OBJ_INFO(0, result, PgSql\\Result, 0)
107 ZEND_ARG_TYPE_INFO(0, field, IS_LONG, 0)
108 ZEND_END_ARG_INFO()
109
110 #define arginfo_pg_fieldsize arginfo_pg_field_size
111
112 #define arginfo_pg_field_type arginfo_pg_field_name
113
114 #define arginfo_pg_fieldtype arginfo_pg_field_name
115
116 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_field_type_oid, 0, 2, MAY_BE_STRING|MAY_BE_LONG)
117 ZEND_ARG_OBJ_INFO(0, result, PgSql\\Result, 0)
118 ZEND_ARG_TYPE_INFO(0, field, IS_LONG, 0)
119 ZEND_END_ARG_INFO()
120
121 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_field_num, 0, 2, IS_LONG, 0)
122 ZEND_ARG_OBJ_INFO(0, result, PgSql\\Result, 0)
123 ZEND_ARG_TYPE_INFO(0, field, IS_STRING, 0)
124 ZEND_END_ARG_INFO()
125
126 #define arginfo_pg_fieldnum arginfo_pg_field_num
127
128 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_fetch_result, 0, 2, MAY_BE_STRING|MAY_BE_FALSE|MAY_BE_NULL)
129 ZEND_ARG_OBJ_INFO(0, result, PgSql\\Result, 0)
130 ZEND_ARG_INFO(0, row)
131 ZEND_ARG_TYPE_MASK(0, field, MAY_BE_STRING|MAY_BE_LONG, NULL)
132 ZEND_END_ARG_INFO()
133
134 #define arginfo_pg_result arginfo_pg_fetch_result
135
136 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_fetch_row, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
137 ZEND_ARG_OBJ_INFO(0, result, PgSql\\Result, 0)
138 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, row, IS_LONG, 1, "null")
139 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "PGSQL_NUM")
140 ZEND_END_ARG_INFO()
141
142 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_fetch_assoc, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
143 ZEND_ARG_OBJ_INFO(0, result, PgSql\\Result, 0)
144 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, row, IS_LONG, 1, "null")
145 ZEND_END_ARG_INFO()
146
147 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_fetch_array, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
148 ZEND_ARG_OBJ_INFO(0, result, PgSql\\Result, 0)
149 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, row, IS_LONG, 1, "null")
150 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "PGSQL_BOTH")
151 ZEND_END_ARG_INFO()
152
153 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_fetch_object, 0, 1, MAY_BE_OBJECT|MAY_BE_FALSE)
154 ZEND_ARG_OBJ_INFO(0, result, PgSql\\Result, 0)
155 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, row, IS_LONG, 1, "null")
156 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, class, IS_STRING, 0, "\"stdClass\"")
157 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, constructor_args, IS_ARRAY, 0, "[]")
158 ZEND_END_ARG_INFO()
159
160 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_fetch_all, 0, 1, IS_ARRAY, 0)
161 ZEND_ARG_OBJ_INFO(0, result, PgSql\\Result, 0)
162 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "PGSQL_ASSOC")
163 ZEND_END_ARG_INFO()
164
165 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_fetch_all_columns, 0, 1, IS_ARRAY, 0)
166 ZEND_ARG_OBJ_INFO(0, result, PgSql\\Result, 0)
167 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, field, IS_LONG, 0, "0")
168 ZEND_END_ARG_INFO()
169
170 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_result_seek, 0, 2, _IS_BOOL, 0)
171 ZEND_ARG_OBJ_INFO(0, result, PgSql\\Result, 0)
172 ZEND_ARG_TYPE_INFO(0, row, IS_LONG, 0)
173 ZEND_END_ARG_INFO()
174
175 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_field_prtlen, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
176 ZEND_ARG_OBJ_INFO(0, result, PgSql\\Result, 0)
177 ZEND_ARG_INFO(0, row)
178 ZEND_ARG_TYPE_MASK(0, field, MAY_BE_STRING|MAY_BE_LONG, NULL)
179 ZEND_END_ARG_INFO()
180
181 #define arginfo_pg_fieldprtlen arginfo_pg_field_prtlen
182
183 #define arginfo_pg_field_is_null arginfo_pg_field_prtlen
184
185 #define arginfo_pg_fieldisnull arginfo_pg_field_prtlen
186
187 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_free_result, 0, 1, _IS_BOOL, 0)
188 ZEND_ARG_OBJ_INFO(0, result, PgSql\\Result, 0)
189 ZEND_END_ARG_INFO()
190
191 #define arginfo_pg_freeresult arginfo_pg_free_result
192
193 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_last_oid, 0, 1, MAY_BE_STRING|MAY_BE_LONG|MAY_BE_FALSE)
194 ZEND_ARG_OBJ_INFO(0, result, PgSql\\Result, 0)
195 ZEND_END_ARG_INFO()
196
197 #define arginfo_pg_getlastoid arginfo_pg_last_oid
198
199 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_trace, 0, 1, _IS_BOOL, 0)
200 ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
201 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_STRING, 0, "\"w\"")
202 ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, connection, PgSql\\Connection, 1, "null")
203 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, trace_mode, IS_LONG, 0, "0")
204 ZEND_END_ARG_INFO()
205
206 #define arginfo_pg_untrace arginfo_pg_close
207
208 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_lo_create, 0, 0, MAY_BE_STRING|MAY_BE_LONG|MAY_BE_FALSE)
209 ZEND_ARG_INFO(0, connection)
210 ZEND_ARG_INFO(0, oid)
211 ZEND_END_ARG_INFO()
212
213 #define arginfo_pg_locreate arginfo_pg_lo_create
214
215 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_lo_unlink, 0, 1, _IS_BOOL, 0)
216 ZEND_ARG_INFO(0, connection)
217 ZEND_ARG_INFO(0, oid)
218 ZEND_END_ARG_INFO()
219
220 #define arginfo_pg_lounlink arginfo_pg_lo_unlink
221
222 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_pg_lo_open, 0, 1, PgSql\\Lob, MAY_BE_FALSE)
223 ZEND_ARG_INFO(0, connection)
224 ZEND_ARG_INFO(0, oid)
225 ZEND_ARG_TYPE_INFO(0, mode, IS_STRING, 0)
226 ZEND_END_ARG_INFO()
227
228 #define arginfo_pg_loopen arginfo_pg_lo_open
229
230 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_lo_close, 0, 1, _IS_BOOL, 0)
231 ZEND_ARG_OBJ_INFO(0, lob, PgSql\\Lob, 0)
232 ZEND_END_ARG_INFO()
233
234 #define arginfo_pg_loclose arginfo_pg_lo_close
235
236 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_lo_read, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
237 ZEND_ARG_OBJ_INFO(0, lob, PgSql\\Lob, 0)
238 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "8192")
239 ZEND_END_ARG_INFO()
240
241 #define arginfo_pg_loread arginfo_pg_lo_read
242
243 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_lo_write, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
244 ZEND_ARG_OBJ_INFO(0, lob, PgSql\\Lob, 0)
245 ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
246 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 1, "null")
247 ZEND_END_ARG_INFO()
248
249 #define arginfo_pg_lowrite arginfo_pg_lo_write
250
251 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_lo_read_all, 0, 1, IS_LONG, 0)
252 ZEND_ARG_OBJ_INFO(0, lob, PgSql\\Lob, 0)
253 ZEND_END_ARG_INFO()
254
255 #define arginfo_pg_loreadall arginfo_pg_lo_read_all
256
257 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_lo_import, 0, 1, MAY_BE_STRING|MAY_BE_LONG|MAY_BE_FALSE)
258 ZEND_ARG_INFO(0, connection)
259 ZEND_ARG_INFO(0, filename)
260 ZEND_ARG_INFO(0, oid)
261 ZEND_END_ARG_INFO()
262
263 #define arginfo_pg_loimport arginfo_pg_lo_import
264
265 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_lo_export, 0, 1, _IS_BOOL, 0)
266 ZEND_ARG_INFO(0, connection)
267 ZEND_ARG_INFO(0, oid)
268 ZEND_ARG_INFO(0, filename)
269 ZEND_END_ARG_INFO()
270
271 #define arginfo_pg_loexport arginfo_pg_lo_export
272
273 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_lo_seek, 0, 2, _IS_BOOL, 0)
274 ZEND_ARG_OBJ_INFO(0, lob, PgSql\\Lob, 0)
275 ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0)
276 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, whence, IS_LONG, 0, "SEEK_CUR")
277 ZEND_END_ARG_INFO()
278
279 #define arginfo_pg_lo_tell arginfo_pg_lo_read_all
280
281 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_lo_truncate, 0, 2, _IS_BOOL, 0)
282 ZEND_ARG_OBJ_INFO(0, lob, PgSql\\Lob, 0)
283 ZEND_ARG_TYPE_INFO(0, size, IS_LONG, 0)
284 ZEND_END_ARG_INFO()
285
286 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_set_error_verbosity, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
287 ZEND_ARG_INFO(0, connection)
288 ZEND_ARG_TYPE_INFO(0, verbosity, IS_LONG, 0)
289 ZEND_END_ARG_INFO()
290
291 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_set_client_encoding, 0, 1, IS_LONG, 0)
292 ZEND_ARG_INFO(0, connection)
293 ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
294 ZEND_END_ARG_INFO()
295
296 #define arginfo_pg_setclientencoding arginfo_pg_set_client_encoding
297
298 #define arginfo_pg_client_encoding arginfo_pg_dbname
299
300 #define arginfo_pg_clientencoding arginfo_pg_dbname
301
302 #define arginfo_pg_end_copy arginfo_pg_ping
303
304 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_put_line, 0, 1, _IS_BOOL, 0)
305 ZEND_ARG_INFO(0, connection)
306 ZEND_ARG_TYPE_INFO(0, query, IS_STRING, 0)
307 ZEND_END_ARG_INFO()
308
309 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_copy_to, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
310 ZEND_ARG_OBJ_INFO(0, connection, PgSql\\Connection, 0)
311 ZEND_ARG_TYPE_INFO(0, table_name, IS_STRING, 0)
312 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, separator, IS_STRING, 0, "\"\\t\"")
313 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, null_as, IS_STRING, 0, "\"\\\\\\\\N\"")
314 ZEND_END_ARG_INFO()
315
316 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_copy_from, 0, 3, _IS_BOOL, 0)
317 ZEND_ARG_OBJ_INFO(0, connection, PgSql\\Connection, 0)
318 ZEND_ARG_TYPE_INFO(0, table_name, IS_STRING, 0)
319 ZEND_ARG_TYPE_INFO(0, rows, IS_ARRAY, 0)
320 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, separator, IS_STRING, 0, "\"\\t\"")
321 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, null_as, IS_STRING, 0, "\"\\\\\\\\N\"")
322 ZEND_END_ARG_INFO()
323
324 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_escape_string, 0, 1, IS_STRING, 0)
325 ZEND_ARG_INFO(0, connection)
326 ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
327 ZEND_END_ARG_INFO()
328
329 #define arginfo_pg_escape_bytea arginfo_pg_escape_string
330
331 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_unescape_bytea, 0, 1, IS_STRING, 0)
332 ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
333 ZEND_END_ARG_INFO()
334
335 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_escape_literal, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
336 ZEND_ARG_INFO(0, connection)
337 ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
338 ZEND_END_ARG_INFO()
339
340 #define arginfo_pg_escape_identifier arginfo_pg_escape_literal
341
342 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_result_error, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
343 ZEND_ARG_OBJ_INFO(0, result, PgSql\\Result, 0)
344 ZEND_END_ARG_INFO()
345
346 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_result_error_field, 0, 2, MAY_BE_STRING|MAY_BE_FALSE|MAY_BE_NULL)
347 ZEND_ARG_OBJ_INFO(0, result, PgSql\\Result, 0)
348 ZEND_ARG_TYPE_INFO(0, field_code, IS_LONG, 0)
349 ZEND_END_ARG_INFO()
350
351 #define arginfo_pg_connection_status arginfo_pg_connect_poll
352
353 #define arginfo_pg_transaction_status arginfo_pg_connect_poll
354
355 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_connection_reset, 0, 1, _IS_BOOL, 0)
356 ZEND_ARG_OBJ_INFO(0, connection, PgSql\\Connection, 0)
357 ZEND_END_ARG_INFO()
358
359 #define arginfo_pg_cancel_query arginfo_pg_connection_reset
360
361 #define arginfo_pg_connection_busy arginfo_pg_connection_reset
362
363 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_send_query, 0, 2, MAY_BE_LONG|MAY_BE_BOOL)
364 ZEND_ARG_OBJ_INFO(0, connection, PgSql\\Connection, 0)
365 ZEND_ARG_TYPE_INFO(0, query, IS_STRING, 0)
366 ZEND_END_ARG_INFO()
367
368 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_send_query_params, 0, 3, MAY_BE_LONG|MAY_BE_BOOL)
369 ZEND_ARG_OBJ_INFO(0, connection, PgSql\\Connection, 0)
370 ZEND_ARG_TYPE_INFO(0, query, IS_STRING, 0)
371 ZEND_ARG_TYPE_INFO(0, params, IS_ARRAY, 0)
372 ZEND_END_ARG_INFO()
373
374 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_send_prepare, 0, 3, MAY_BE_LONG|MAY_BE_BOOL)
375 ZEND_ARG_OBJ_INFO(0, connection, PgSql\\Connection, 0)
376 ZEND_ARG_TYPE_INFO(0, statement_name, IS_STRING, 0)
377 ZEND_ARG_TYPE_INFO(0, query, IS_STRING, 0)
378 ZEND_END_ARG_INFO()
379
380 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_send_execute, 0, 3, MAY_BE_LONG|MAY_BE_BOOL)
381 ZEND_ARG_OBJ_INFO(0, connection, PgSql\\Connection, 0)
382 ZEND_ARG_TYPE_INFO(0, statement_name, IS_STRING, 0)
383 ZEND_ARG_TYPE_INFO(0, params, IS_ARRAY, 0)
384 ZEND_END_ARG_INFO()
385
386 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_pg_get_result, 0, 1, PgSql\\Result, MAY_BE_FALSE)
387 ZEND_ARG_OBJ_INFO(0, connection, PgSql\\Connection, 0)
388 ZEND_END_ARG_INFO()
389
390 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_result_status, 0, 1, MAY_BE_STRING|MAY_BE_LONG)
391 ZEND_ARG_OBJ_INFO(0, result, PgSql\\Result, 0)
392 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "PGSQL_STATUS_LONG")
393 ZEND_END_ARG_INFO()
394
395 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_get_notify, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
396 ZEND_ARG_OBJ_INFO(0, connection, PgSql\\Connection, 0)
397 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "PGSQL_ASSOC")
398 ZEND_END_ARG_INFO()
399
400 #define arginfo_pg_get_pid arginfo_pg_connect_poll
401
402 ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_socket, 0, 0, 1)
403 ZEND_ARG_OBJ_INFO(0, connection, PgSql\\Connection, 0)
404 ZEND_END_ARG_INFO()
405
406 #define arginfo_pg_consume_input arginfo_pg_connection_reset
407
408 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_flush, 0, 1, MAY_BE_LONG|MAY_BE_BOOL)
409 ZEND_ARG_OBJ_INFO(0, connection, PgSql\\Connection, 0)
410 ZEND_END_ARG_INFO()
411
412 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_meta_data, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
413 ZEND_ARG_OBJ_INFO(0, connection, PgSql\\Connection, 0)
414 ZEND_ARG_TYPE_INFO(0, table_name, IS_STRING, 0)
415 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, extended, _IS_BOOL, 0, "false")
416 ZEND_END_ARG_INFO()
417
418 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_convert, 0, 3, MAY_BE_ARRAY|MAY_BE_FALSE)
419 ZEND_ARG_OBJ_INFO(0, connection, PgSql\\Connection, 0)
420 ZEND_ARG_TYPE_INFO(0, table_name, IS_STRING, 0)
421 ZEND_ARG_TYPE_INFO(0, values, IS_ARRAY, 0)
422 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
423 ZEND_END_ARG_INFO()
424
425 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_pg_insert, 0, 3, PgSql\\Result, MAY_BE_STRING|MAY_BE_BOOL)
426 ZEND_ARG_OBJ_INFO(0, connection, PgSql\\Connection, 0)
427 ZEND_ARG_TYPE_INFO(0, table_name, IS_STRING, 0)
428 ZEND_ARG_TYPE_INFO(0, values, IS_ARRAY, 0)
429 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "PGSQL_DML_EXEC")
430 ZEND_END_ARG_INFO()
431
432 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_update, 0, 4, MAY_BE_STRING|MAY_BE_BOOL)
433 ZEND_ARG_OBJ_INFO(0, connection, PgSql\\Connection, 0)
434 ZEND_ARG_TYPE_INFO(0, table_name, IS_STRING, 0)
435 ZEND_ARG_TYPE_INFO(0, values, IS_ARRAY, 0)
436 ZEND_ARG_TYPE_INFO(0, conditions, IS_ARRAY, 0)
437 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "PGSQL_DML_EXEC")
438 ZEND_END_ARG_INFO()
439
440 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_delete, 0, 3, MAY_BE_STRING|MAY_BE_BOOL)
441 ZEND_ARG_OBJ_INFO(0, connection, PgSql\\Connection, 0)
442 ZEND_ARG_TYPE_INFO(0, table_name, IS_STRING, 0)
443 ZEND_ARG_TYPE_INFO(0, conditions, IS_ARRAY, 0)
444 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "PGSQL_DML_EXEC")
445 ZEND_END_ARG_INFO()
446
447 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_select, 0, 3, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_FALSE)
448 ZEND_ARG_OBJ_INFO(0, connection, PgSql\\Connection, 0)
449 ZEND_ARG_TYPE_INFO(0, table_name, IS_STRING, 0)
450 ZEND_ARG_TYPE_INFO(0, conditions, IS_ARRAY, 0)
451 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "PGSQL_DML_EXEC")
452 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "PGSQL_ASSOC")
453 ZEND_END_ARG_INFO()
454
455 #if defined(HAVE_PG_CONTEXT_VISIBILITY)
456 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_set_error_context_visibility, 0, 2, IS_LONG, 0)
457 ZEND_ARG_OBJ_INFO(0, connection, PgSql\\Connection, 0)
458 ZEND_ARG_TYPE_INFO(0, visibility, IS_LONG, 0)
459 ZEND_END_ARG_INFO()
460 #endif
461
462
463 ZEND_FUNCTION(pg_connect);
464 ZEND_FUNCTION(pg_pconnect);
465 ZEND_FUNCTION(pg_connect_poll);
466 ZEND_FUNCTION(pg_close);
467 ZEND_FUNCTION(pg_dbname);
468 ZEND_FUNCTION(pg_last_error);
469 ZEND_FUNCTION(pg_options);
470 ZEND_FUNCTION(pg_port);
471 ZEND_FUNCTION(pg_tty);
472 ZEND_FUNCTION(pg_host);
473 ZEND_FUNCTION(pg_version);
474 ZEND_FUNCTION(pg_parameter_status);
475 ZEND_FUNCTION(pg_ping);
476 ZEND_FUNCTION(pg_query);
477 ZEND_FUNCTION(pg_query_params);
478 ZEND_FUNCTION(pg_prepare);
479 ZEND_FUNCTION(pg_execute);
480 ZEND_FUNCTION(pg_num_rows);
481 ZEND_FUNCTION(pg_num_fields);
482 ZEND_FUNCTION(pg_affected_rows);
483 ZEND_FUNCTION(pg_last_notice);
484 ZEND_FUNCTION(pg_field_table);
485 ZEND_FUNCTION(pg_field_name);
486 ZEND_FUNCTION(pg_field_size);
487 ZEND_FUNCTION(pg_field_type);
488 ZEND_FUNCTION(pg_field_type_oid);
489 ZEND_FUNCTION(pg_field_num);
490 ZEND_FUNCTION(pg_fetch_result);
491 ZEND_FUNCTION(pg_fetch_row);
492 ZEND_FUNCTION(pg_fetch_assoc);
493 ZEND_FUNCTION(pg_fetch_array);
494 ZEND_FUNCTION(pg_fetch_object);
495 ZEND_FUNCTION(pg_fetch_all);
496 ZEND_FUNCTION(pg_fetch_all_columns);
497 ZEND_FUNCTION(pg_result_seek);
498 ZEND_FUNCTION(pg_field_prtlen);
499 ZEND_FUNCTION(pg_fieldprtlen);
500 ZEND_FUNCTION(pg_field_is_null);
501 ZEND_FUNCTION(pg_fieldisnull);
502 ZEND_FUNCTION(pg_free_result);
503 ZEND_FUNCTION(pg_last_oid);
504 ZEND_FUNCTION(pg_trace);
505 ZEND_FUNCTION(pg_untrace);
506 ZEND_FUNCTION(pg_lo_create);
507 ZEND_FUNCTION(pg_lo_unlink);
508 ZEND_FUNCTION(pg_lo_open);
509 ZEND_FUNCTION(pg_lo_close);
510 ZEND_FUNCTION(pg_lo_read);
511 ZEND_FUNCTION(pg_lo_write);
512 ZEND_FUNCTION(pg_lo_read_all);
513 ZEND_FUNCTION(pg_lo_import);
514 ZEND_FUNCTION(pg_lo_export);
515 ZEND_FUNCTION(pg_lo_seek);
516 ZEND_FUNCTION(pg_lo_tell);
517 ZEND_FUNCTION(pg_lo_truncate);
518 ZEND_FUNCTION(pg_set_error_verbosity);
519 ZEND_FUNCTION(pg_set_client_encoding);
520 ZEND_FUNCTION(pg_client_encoding);
521 ZEND_FUNCTION(pg_end_copy);
522 ZEND_FUNCTION(pg_put_line);
523 ZEND_FUNCTION(pg_copy_to);
524 ZEND_FUNCTION(pg_copy_from);
525 ZEND_FUNCTION(pg_escape_string);
526 ZEND_FUNCTION(pg_escape_bytea);
527 ZEND_FUNCTION(pg_unescape_bytea);
528 ZEND_FUNCTION(pg_escape_literal);
529 ZEND_FUNCTION(pg_escape_identifier);
530 ZEND_FUNCTION(pg_result_error);
531 ZEND_FUNCTION(pg_result_error_field);
532 ZEND_FUNCTION(pg_connection_status);
533 ZEND_FUNCTION(pg_transaction_status);
534 ZEND_FUNCTION(pg_connection_reset);
535 ZEND_FUNCTION(pg_cancel_query);
536 ZEND_FUNCTION(pg_connection_busy);
537 ZEND_FUNCTION(pg_send_query);
538 ZEND_FUNCTION(pg_send_query_params);
539 ZEND_FUNCTION(pg_send_prepare);
540 ZEND_FUNCTION(pg_send_execute);
541 ZEND_FUNCTION(pg_get_result);
542 ZEND_FUNCTION(pg_result_status);
543 ZEND_FUNCTION(pg_get_notify);
544 ZEND_FUNCTION(pg_get_pid);
545 ZEND_FUNCTION(pg_socket);
546 ZEND_FUNCTION(pg_consume_input);
547 ZEND_FUNCTION(pg_flush);
548 ZEND_FUNCTION(pg_meta_data);
549 ZEND_FUNCTION(pg_convert);
550 ZEND_FUNCTION(pg_insert);
551 ZEND_FUNCTION(pg_update);
552 ZEND_FUNCTION(pg_delete);
553 ZEND_FUNCTION(pg_select);
554 #if defined(HAVE_PG_CONTEXT_VISIBILITY)
555 ZEND_FUNCTION(pg_set_error_context_visibility);
556 #endif
557
558
559 static const zend_function_entry ext_functions[] = {
560 ZEND_FE(pg_connect, arginfo_pg_connect)
561 ZEND_FE(pg_pconnect, arginfo_pg_pconnect)
562 ZEND_FE(pg_connect_poll, arginfo_pg_connect_poll)
563 ZEND_FE(pg_close, arginfo_pg_close)
564 ZEND_FE(pg_dbname, arginfo_pg_dbname)
565 ZEND_FE(pg_last_error, arginfo_pg_last_error)
566 ZEND_DEP_FALIAS(pg_errormessage, pg_last_error, arginfo_pg_errormessage)
567 ZEND_FE(pg_options, arginfo_pg_options)
568 ZEND_FE(pg_port, arginfo_pg_port)
569 ZEND_FE(pg_tty, arginfo_pg_tty)
570 ZEND_FE(pg_host, arginfo_pg_host)
571 ZEND_FE(pg_version, arginfo_pg_version)
572 ZEND_FE(pg_parameter_status, arginfo_pg_parameter_status)
573 ZEND_FE(pg_ping, arginfo_pg_ping)
574 ZEND_FE(pg_query, arginfo_pg_query)
575 ZEND_FALIAS(pg_exec, pg_query, arginfo_pg_exec)
576 ZEND_FE(pg_query_params, arginfo_pg_query_params)
577 ZEND_FE(pg_prepare, arginfo_pg_prepare)
578 ZEND_FE(pg_execute, arginfo_pg_execute)
579 ZEND_FE(pg_num_rows, arginfo_pg_num_rows)
580 ZEND_DEP_FALIAS(pg_numrows, pg_num_rows, arginfo_pg_numrows)
581 ZEND_FE(pg_num_fields, arginfo_pg_num_fields)
582 ZEND_DEP_FALIAS(pg_numfields, pg_num_fields, arginfo_pg_numfields)
583 ZEND_FE(pg_affected_rows, arginfo_pg_affected_rows)
584 ZEND_DEP_FALIAS(pg_cmdtuples, pg_affected_rows, arginfo_pg_cmdtuples)
585 ZEND_FE(pg_last_notice, arginfo_pg_last_notice)
586 ZEND_FE(pg_field_table, arginfo_pg_field_table)
587 ZEND_FE(pg_field_name, arginfo_pg_field_name)
588 ZEND_DEP_FALIAS(pg_fieldname, pg_field_name, arginfo_pg_fieldname)
589 ZEND_FE(pg_field_size, arginfo_pg_field_size)
590 ZEND_DEP_FALIAS(pg_fieldsize, pg_field_size, arginfo_pg_fieldsize)
591 ZEND_FE(pg_field_type, arginfo_pg_field_type)
592 ZEND_DEP_FALIAS(pg_fieldtype, pg_field_type, arginfo_pg_fieldtype)
593 ZEND_FE(pg_field_type_oid, arginfo_pg_field_type_oid)
594 ZEND_FE(pg_field_num, arginfo_pg_field_num)
595 ZEND_DEP_FALIAS(pg_fieldnum, pg_field_num, arginfo_pg_fieldnum)
596 ZEND_FE(pg_fetch_result, arginfo_pg_fetch_result)
597 ZEND_DEP_FALIAS(pg_result, pg_fetch_result, arginfo_pg_result)
598 ZEND_FE(pg_fetch_row, arginfo_pg_fetch_row)
599 ZEND_FE(pg_fetch_assoc, arginfo_pg_fetch_assoc)
600 ZEND_FE(pg_fetch_array, arginfo_pg_fetch_array)
601 ZEND_FE(pg_fetch_object, arginfo_pg_fetch_object)
602 ZEND_FE(pg_fetch_all, arginfo_pg_fetch_all)
603 ZEND_FE(pg_fetch_all_columns, arginfo_pg_fetch_all_columns)
604 ZEND_FE(pg_result_seek, arginfo_pg_result_seek)
605 ZEND_FE(pg_field_prtlen, arginfo_pg_field_prtlen)
606 ZEND_DEP_FE(pg_fieldprtlen, arginfo_pg_fieldprtlen)
607 ZEND_FE(pg_field_is_null, arginfo_pg_field_is_null)
608 ZEND_DEP_FE(pg_fieldisnull, arginfo_pg_fieldisnull)
609 ZEND_FE(pg_free_result, arginfo_pg_free_result)
610 ZEND_DEP_FALIAS(pg_freeresult, pg_free_result, arginfo_pg_freeresult)
611 ZEND_FE(pg_last_oid, arginfo_pg_last_oid)
612 ZEND_DEP_FALIAS(pg_getlastoid, pg_last_oid, arginfo_pg_getlastoid)
613 ZEND_FE(pg_trace, arginfo_pg_trace)
614 ZEND_FE(pg_untrace, arginfo_pg_untrace)
615 ZEND_FE(pg_lo_create, arginfo_pg_lo_create)
616 ZEND_DEP_FALIAS(pg_locreate, pg_lo_create, arginfo_pg_locreate)
617 ZEND_FE(pg_lo_unlink, arginfo_pg_lo_unlink)
618 ZEND_DEP_FALIAS(pg_lounlink, pg_lo_unlink, arginfo_pg_lounlink)
619 ZEND_FE(pg_lo_open, arginfo_pg_lo_open)
620 ZEND_DEP_FALIAS(pg_loopen, pg_lo_open, arginfo_pg_loopen)
621 ZEND_FE(pg_lo_close, arginfo_pg_lo_close)
622 ZEND_DEP_FALIAS(pg_loclose, pg_lo_close, arginfo_pg_loclose)
623 ZEND_FE(pg_lo_read, arginfo_pg_lo_read)
624 ZEND_DEP_FALIAS(pg_loread, pg_lo_read, arginfo_pg_loread)
625 ZEND_FE(pg_lo_write, arginfo_pg_lo_write)
626 ZEND_DEP_FALIAS(pg_lowrite, pg_lo_write, arginfo_pg_lowrite)
627 ZEND_FE(pg_lo_read_all, arginfo_pg_lo_read_all)
628 ZEND_DEP_FALIAS(pg_loreadall, pg_lo_read_all, arginfo_pg_loreadall)
629 ZEND_FE(pg_lo_import, arginfo_pg_lo_import)
630 ZEND_DEP_FALIAS(pg_loimport, pg_lo_import, arginfo_pg_loimport)
631 ZEND_FE(pg_lo_export, arginfo_pg_lo_export)
632 ZEND_DEP_FALIAS(pg_loexport, pg_lo_export, arginfo_pg_loexport)
633 ZEND_FE(pg_lo_seek, arginfo_pg_lo_seek)
634 ZEND_FE(pg_lo_tell, arginfo_pg_lo_tell)
635 ZEND_FE(pg_lo_truncate, arginfo_pg_lo_truncate)
636 ZEND_FE(pg_set_error_verbosity, arginfo_pg_set_error_verbosity)
637 ZEND_FE(pg_set_client_encoding, arginfo_pg_set_client_encoding)
638 ZEND_DEP_FALIAS(pg_setclientencoding, pg_set_client_encoding, arginfo_pg_setclientencoding)
639 ZEND_FE(pg_client_encoding, arginfo_pg_client_encoding)
640 ZEND_DEP_FALIAS(pg_clientencoding, pg_client_encoding, arginfo_pg_clientencoding)
641 ZEND_FE(pg_end_copy, arginfo_pg_end_copy)
642 ZEND_FE(pg_put_line, arginfo_pg_put_line)
643 ZEND_FE(pg_copy_to, arginfo_pg_copy_to)
644 ZEND_FE(pg_copy_from, arginfo_pg_copy_from)
645 ZEND_FE(pg_escape_string, arginfo_pg_escape_string)
646 ZEND_FE(pg_escape_bytea, arginfo_pg_escape_bytea)
647 ZEND_FE(pg_unescape_bytea, arginfo_pg_unescape_bytea)
648 ZEND_FE(pg_escape_literal, arginfo_pg_escape_literal)
649 ZEND_FE(pg_escape_identifier, arginfo_pg_escape_identifier)
650 ZEND_FE(pg_result_error, arginfo_pg_result_error)
651 ZEND_FE(pg_result_error_field, arginfo_pg_result_error_field)
652 ZEND_FE(pg_connection_status, arginfo_pg_connection_status)
653 ZEND_FE(pg_transaction_status, arginfo_pg_transaction_status)
654 ZEND_FE(pg_connection_reset, arginfo_pg_connection_reset)
655 ZEND_FE(pg_cancel_query, arginfo_pg_cancel_query)
656 ZEND_FE(pg_connection_busy, arginfo_pg_connection_busy)
657 ZEND_FE(pg_send_query, arginfo_pg_send_query)
658 ZEND_FE(pg_send_query_params, arginfo_pg_send_query_params)
659 ZEND_FE(pg_send_prepare, arginfo_pg_send_prepare)
660 ZEND_FE(pg_send_execute, arginfo_pg_send_execute)
661 ZEND_FE(pg_get_result, arginfo_pg_get_result)
662 ZEND_FE(pg_result_status, arginfo_pg_result_status)
663 ZEND_FE(pg_get_notify, arginfo_pg_get_notify)
664 ZEND_FE(pg_get_pid, arginfo_pg_get_pid)
665 ZEND_FE(pg_socket, arginfo_pg_socket)
666 ZEND_FE(pg_consume_input, arginfo_pg_consume_input)
667 ZEND_FE(pg_flush, arginfo_pg_flush)
668 ZEND_FE(pg_meta_data, arginfo_pg_meta_data)
669 ZEND_FE(pg_convert, arginfo_pg_convert)
670 ZEND_FE(pg_insert, arginfo_pg_insert)
671 ZEND_FE(pg_update, arginfo_pg_update)
672 ZEND_FE(pg_delete, arginfo_pg_delete)
673 ZEND_FE(pg_select, arginfo_pg_select)
674 #if defined(HAVE_PG_CONTEXT_VISIBILITY)
675 ZEND_FE(pg_set_error_context_visibility, arginfo_pg_set_error_context_visibility)
676 #endif
677 ZEND_FE_END
678 };
679
680
681 static const zend_function_entry class_PgSql_Connection_methods[] = {
682 ZEND_FE_END
683 };
684
685
686 static const zend_function_entry class_PgSql_Result_methods[] = {
687 ZEND_FE_END
688 };
689
690
691 static const zend_function_entry class_PgSql_Lob_methods[] = {
692 ZEND_FE_END
693 };
694
register_pgsql_symbols(int module_number)695 static void register_pgsql_symbols(int module_number)
696 {
697 REGISTER_STRING_CONSTANT("PGSQL_LIBPQ_VERSION", pgsql_libpq_version, CONST_PERSISTENT);
698 REGISTER_STRING_CONSTANT("PGSQL_LIBPQ_VERSION_STR", pgsql_libpq_version, CONST_PERSISTENT | CONST_DEPRECATED);
699 REGISTER_LONG_CONSTANT("PGSQL_CONNECT_FORCE_NEW", PGSQL_CONNECT_FORCE_NEW, CONST_PERSISTENT);
700 REGISTER_LONG_CONSTANT("PGSQL_CONNECT_ASYNC", PGSQL_CONNECT_ASYNC, CONST_PERSISTENT);
701 REGISTER_LONG_CONSTANT("PGSQL_ASSOC", PGSQL_ASSOC, CONST_PERSISTENT);
702 REGISTER_LONG_CONSTANT("PGSQL_NUM", PGSQL_NUM, CONST_PERSISTENT);
703 REGISTER_LONG_CONSTANT("PGSQL_BOTH", PGSQL_BOTH, CONST_PERSISTENT);
704 REGISTER_LONG_CONSTANT("PGSQL_NOTICE_LAST", PGSQL_NOTICE_LAST, CONST_PERSISTENT);
705 REGISTER_LONG_CONSTANT("PGSQL_NOTICE_ALL", PGSQL_NOTICE_ALL, CONST_PERSISTENT);
706 REGISTER_LONG_CONSTANT("PGSQL_NOTICE_CLEAR", PGSQL_NOTICE_CLEAR, CONST_PERSISTENT);
707 REGISTER_LONG_CONSTANT("PGSQL_CONNECTION_BAD", CONNECTION_BAD, CONST_PERSISTENT);
708 REGISTER_LONG_CONSTANT("PGSQL_CONNECTION_OK", CONNECTION_OK, CONST_PERSISTENT);
709 REGISTER_LONG_CONSTANT("PGSQL_CONNECTION_STARTED", CONNECTION_STARTED, CONST_PERSISTENT);
710 REGISTER_LONG_CONSTANT("PGSQL_CONNECTION_MADE", CONNECTION_MADE, CONST_PERSISTENT);
711 REGISTER_LONG_CONSTANT("PGSQL_CONNECTION_AWAITING_RESPONSE", CONNECTION_AWAITING_RESPONSE, CONST_PERSISTENT);
712 REGISTER_LONG_CONSTANT("PGSQL_CONNECTION_AUTH_OK", CONNECTION_AUTH_OK, CONST_PERSISTENT);
713 #if defined(CONNECTION_SSL_STARTUP)
714 REGISTER_LONG_CONSTANT("PGSQL_CONNECTION_SSL_STARTUP", CONNECTION_SSL_STARTUP, CONST_PERSISTENT);
715 #endif
716 REGISTER_LONG_CONSTANT("PGSQL_CONNECTION_SETENV", CONNECTION_SETENV, CONST_PERSISTENT);
717 REGISTER_LONG_CONSTANT("PGSQL_POLLING_FAILED", PGRES_POLLING_FAILED, CONST_PERSISTENT);
718 REGISTER_LONG_CONSTANT("PGSQL_POLLING_READING", PGRES_POLLING_READING, CONST_PERSISTENT);
719 REGISTER_LONG_CONSTANT("PGSQL_POLLING_WRITING", PGRES_POLLING_WRITING, CONST_PERSISTENT);
720 REGISTER_LONG_CONSTANT("PGSQL_POLLING_OK", PGRES_POLLING_OK, CONST_PERSISTENT);
721 REGISTER_LONG_CONSTANT("PGSQL_POLLING_ACTIVE", PGRES_POLLING_ACTIVE, CONST_PERSISTENT);
722 REGISTER_LONG_CONSTANT("PGSQL_TRANSACTION_IDLE", PQTRANS_IDLE, CONST_PERSISTENT);
723 REGISTER_LONG_CONSTANT("PGSQL_TRANSACTION_ACTIVE", PQTRANS_ACTIVE, CONST_PERSISTENT);
724 REGISTER_LONG_CONSTANT("PGSQL_TRANSACTION_INTRANS", PQTRANS_INTRANS, CONST_PERSISTENT);
725 REGISTER_LONG_CONSTANT("PGSQL_TRANSACTION_INERROR", PQTRANS_INERROR, CONST_PERSISTENT);
726 REGISTER_LONG_CONSTANT("PGSQL_TRANSACTION_UNKNOWN", PQTRANS_UNKNOWN, CONST_PERSISTENT);
727 REGISTER_LONG_CONSTANT("PGSQL_ERRORS_TERSE", PQERRORS_TERSE, CONST_PERSISTENT);
728 REGISTER_LONG_CONSTANT("PGSQL_ERRORS_DEFAULT", PQERRORS_DEFAULT, CONST_PERSISTENT);
729 REGISTER_LONG_CONSTANT("PGSQL_ERRORS_VERBOSE", PQERRORS_VERBOSE, CONST_PERSISTENT);
730 #if PGVERSION_NUM > 110000
731 REGISTER_LONG_CONSTANT("PGSQL_ERRORS_SQLSTATE", PQERRORS_SQLSTATE, CONST_PERSISTENT);
732 #endif
733 #if !(PGVERSION_NUM > 110000)
734 REGISTER_LONG_CONSTANT("PGSQL_ERRORS_SQLSTATE", PQERRORS_TERSE, CONST_PERSISTENT);
735 #endif
736 REGISTER_LONG_CONSTANT("PGSQL_SEEK_SET", SEEK_SET, CONST_PERSISTENT);
737 REGISTER_LONG_CONSTANT("PGSQL_SEEK_CUR", SEEK_CUR, CONST_PERSISTENT);
738 REGISTER_LONG_CONSTANT("PGSQL_SEEK_END", SEEK_END, CONST_PERSISTENT);
739 REGISTER_LONG_CONSTANT("PGSQL_STATUS_LONG", PGSQL_STATUS_LONG, CONST_PERSISTENT);
740 REGISTER_LONG_CONSTANT("PGSQL_STATUS_STRING", PGSQL_STATUS_STRING, CONST_PERSISTENT);
741 REGISTER_LONG_CONSTANT("PGSQL_EMPTY_QUERY", PGRES_EMPTY_QUERY, CONST_PERSISTENT);
742 REGISTER_LONG_CONSTANT("PGSQL_COMMAND_OK", PGRES_COMMAND_OK, CONST_PERSISTENT);
743 REGISTER_LONG_CONSTANT("PGSQL_TUPLES_OK", PGRES_TUPLES_OK, CONST_PERSISTENT);
744 REGISTER_LONG_CONSTANT("PGSQL_COPY_OUT", PGRES_COPY_OUT, CONST_PERSISTENT);
745 REGISTER_LONG_CONSTANT("PGSQL_COPY_IN", PGRES_COPY_IN, CONST_PERSISTENT);
746 REGISTER_LONG_CONSTANT("PGSQL_BAD_RESPONSE", PGRES_BAD_RESPONSE, CONST_PERSISTENT);
747 REGISTER_LONG_CONSTANT("PGSQL_NONFATAL_ERROR", PGRES_NONFATAL_ERROR, CONST_PERSISTENT);
748 REGISTER_LONG_CONSTANT("PGSQL_FATAL_ERROR", PGRES_FATAL_ERROR, CONST_PERSISTENT);
749 REGISTER_LONG_CONSTANT("PGSQL_DIAG_SEVERITY", PG_DIAG_SEVERITY, CONST_PERSISTENT);
750 REGISTER_LONG_CONSTANT("PGSQL_DIAG_SQLSTATE", PG_DIAG_SQLSTATE, CONST_PERSISTENT);
751 REGISTER_LONG_CONSTANT("PGSQL_DIAG_MESSAGE_PRIMARY", PG_DIAG_MESSAGE_PRIMARY, CONST_PERSISTENT);
752 REGISTER_LONG_CONSTANT("PGSQL_DIAG_MESSAGE_DETAIL", PG_DIAG_MESSAGE_DETAIL, CONST_PERSISTENT);
753 REGISTER_LONG_CONSTANT("PGSQL_DIAG_MESSAGE_HINT", PG_DIAG_MESSAGE_HINT, CONST_PERSISTENT);
754 REGISTER_LONG_CONSTANT("PGSQL_DIAG_STATEMENT_POSITION", PG_DIAG_STATEMENT_POSITION, CONST_PERSISTENT);
755 #if defined(PG_DIAG_INTERNAL_POSITION)
756 REGISTER_LONG_CONSTANT("PGSQL_DIAG_INTERNAL_POSITION", PG_DIAG_INTERNAL_POSITION, CONST_PERSISTENT);
757 #endif
758 #if defined(PG_DIAG_INTERNAL_QUERY)
759 REGISTER_LONG_CONSTANT("PGSQL_DIAG_INTERNAL_QUERY", PG_DIAG_INTERNAL_QUERY, CONST_PERSISTENT);
760 #endif
761 REGISTER_LONG_CONSTANT("PGSQL_DIAG_CONTEXT", PG_DIAG_CONTEXT, CONST_PERSISTENT);
762 REGISTER_LONG_CONSTANT("PGSQL_DIAG_SOURCE_FILE", PG_DIAG_SOURCE_FILE, CONST_PERSISTENT);
763 REGISTER_LONG_CONSTANT("PGSQL_DIAG_SOURCE_LINE", PG_DIAG_SOURCE_LINE, CONST_PERSISTENT);
764 REGISTER_LONG_CONSTANT("PGSQL_DIAG_SOURCE_FUNCTION", PG_DIAG_SOURCE_FUNCTION, CONST_PERSISTENT);
765 #if defined(PG_DIAG_SCHEMA_NAME)
766 REGISTER_LONG_CONSTANT("PGSQL_DIAG_SCHEMA_NAME", PG_DIAG_SCHEMA_NAME, CONST_PERSISTENT);
767 #endif
768 #if defined(PG_DIAG_TABLE_NAME)
769 REGISTER_LONG_CONSTANT("PGSQL_DIAG_TABLE_NAME", PG_DIAG_TABLE_NAME, CONST_PERSISTENT);
770 #endif
771 #if defined(PG_DIAG_COLUMN_NAME)
772 REGISTER_LONG_CONSTANT("PGSQL_DIAG_COLUMN_NAME", PG_DIAG_COLUMN_NAME, CONST_PERSISTENT);
773 #endif
774 #if defined(PG_DIAG_DATATYPE_NAME)
775 REGISTER_LONG_CONSTANT("PGSQL_DIAG_DATATYPE_NAME", PG_DIAG_DATATYPE_NAME, CONST_PERSISTENT);
776 #endif
777 #if defined(PG_DIAG_CONSTRAINT_NAME)
778 REGISTER_LONG_CONSTANT("PGSQL_DIAG_CONSTRAINT_NAME", PG_DIAG_CONSTRAINT_NAME, CONST_PERSISTENT);
779 #endif
780 #if defined(PG_DIAG_SEVERITY_NONLOCALIZED)
781 REGISTER_LONG_CONSTANT("PGSQL_DIAG_SEVERITY_NONLOCALIZED", PG_DIAG_SEVERITY_NONLOCALIZED, CONST_PERSISTENT);
782 #endif
783 REGISTER_LONG_CONSTANT("PGSQL_CONV_IGNORE_DEFAULT", PGSQL_CONV_IGNORE_DEFAULT, CONST_PERSISTENT);
784 REGISTER_LONG_CONSTANT("PGSQL_CONV_FORCE_NULL", PGSQL_CONV_FORCE_NULL, CONST_PERSISTENT);
785 REGISTER_LONG_CONSTANT("PGSQL_CONV_IGNORE_NOT_NULL", PGSQL_CONV_IGNORE_NOT_NULL, CONST_PERSISTENT);
786 REGISTER_LONG_CONSTANT("PGSQL_DML_ESCAPE", PGSQL_DML_ESCAPE, CONST_PERSISTENT);
787 REGISTER_LONG_CONSTANT("PGSQL_DML_NO_CONV", PGSQL_DML_NO_CONV, CONST_PERSISTENT);
788 REGISTER_LONG_CONSTANT("PGSQL_DML_EXEC", PGSQL_DML_EXEC, CONST_PERSISTENT);
789 REGISTER_LONG_CONSTANT("PGSQL_DML_ASYNC", PGSQL_DML_ASYNC, CONST_PERSISTENT);
790 REGISTER_LONG_CONSTANT("PGSQL_DML_STRING", PGSQL_DML_STRING, CONST_PERSISTENT);
791 #if defined(PQTRACE_SUPPPRESS_TIMESTAMPS)
792 REGISTER_LONG_CONSTANT("PGSQL_TRACE_SUPPRESS_TIMESTAMPS", PQTRACE_SUPPRESS_TIMESTAMPS, CONST_PERSISTENT);
793 #endif
794 #if defined(PQTRACE_REGRESS_MODE)
795 REGISTER_LONG_CONSTANT("PGSQL_TRACE_REGRESS_MODE", PQTRACE_REGRESS_MODE, CONST_PERSISTENT);
796 #endif
797 #if defined(HAVE_PG_CONTEXT_VISIBILITY)
798 REGISTER_LONG_CONSTANT("PGSQL_SHOW_CONTEXT_NEVER", PQSHOW_CONTEXT_NEVER, CONST_PERSISTENT);
799 #endif
800 #if defined(HAVE_PG_CONTEXT_VISIBILITY)
801 REGISTER_LONG_CONSTANT("PGSQL_SHOW_CONTEXT_ERRORS", PQSHOW_CONTEXT_ERRORS, CONST_PERSISTENT);
802 #endif
803 #if defined(HAVE_PG_CONTEXT_VISIBILITY)
804 REGISTER_LONG_CONSTANT("PGSQL_SHOW_CONTEXT_ALWAYS", PQSHOW_CONTEXT_ALWAYS, CONST_PERSISTENT);
805 #endif
806 }
807
register_class_PgSql_Connection(void)808 static zend_class_entry *register_class_PgSql_Connection(void)
809 {
810 zend_class_entry ce, *class_entry;
811
812 INIT_NS_CLASS_ENTRY(ce, "PgSql", "Connection", class_PgSql_Connection_methods);
813 class_entry = zend_register_internal_class_ex(&ce, NULL);
814 class_entry->ce_flags |= ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES|ZEND_ACC_NOT_SERIALIZABLE;
815
816 return class_entry;
817 }
818
register_class_PgSql_Result(void)819 static zend_class_entry *register_class_PgSql_Result(void)
820 {
821 zend_class_entry ce, *class_entry;
822
823 INIT_NS_CLASS_ENTRY(ce, "PgSql", "Result", class_PgSql_Result_methods);
824 class_entry = zend_register_internal_class_ex(&ce, NULL);
825 class_entry->ce_flags |= ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES|ZEND_ACC_NOT_SERIALIZABLE;
826
827 return class_entry;
828 }
829
register_class_PgSql_Lob(void)830 static zend_class_entry *register_class_PgSql_Lob(void)
831 {
832 zend_class_entry ce, *class_entry;
833
834 INIT_NS_CLASS_ENTRY(ce, "PgSql", "Lob", class_PgSql_Lob_methods);
835 class_entry = zend_register_internal_class_ex(&ce, NULL);
836 class_entry->ce_flags |= ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES|ZEND_ACC_NOT_SERIALIZABLE;
837
838 return class_entry;
839 }
840