1 /* This is a generated file, edit the .stub.php file instead.
2  * Stub hash: 72a1beeb327cd6fdb135ed8de8c6fc1372f76303 */
3 
4 ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_connect, 0, 0, 1)
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_INFO(0, connection)
13 ZEND_END_ARG_INFO()
14 
15 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_close, 0, 0, _IS_BOOL, 0)
16 	ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, connection, "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_INFO_WITH_DEFAULT_VALUE(0, connection, "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_INFO_WITH_DEFAULT_VALUE(0, connection, "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 #define arginfo_pg_ping arginfo_pg_close
45 
46 ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_query, 0, 0, 1)
47 	ZEND_ARG_INFO(0, connection)
48 	ZEND_ARG_TYPE_INFO(0, query, IS_STRING, 0)
49 ZEND_END_ARG_INFO()
50 
51 #define arginfo_pg_exec arginfo_pg_query
52 
53 ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_query_params, 0, 0, 2)
54 	ZEND_ARG_INFO(0, connection)
55 	ZEND_ARG_INFO(0, query)
56 	ZEND_ARG_TYPE_INFO(0, params, IS_ARRAY, 0)
57 ZEND_END_ARG_INFO()
58 
59 ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_prepare, 0, 0, 2)
60 	ZEND_ARG_INFO(0, connection)
61 	ZEND_ARG_TYPE_INFO(0, statement_name, IS_STRING, 0)
62 	ZEND_ARG_TYPE_INFO(0, query, IS_STRING, 0)
63 ZEND_END_ARG_INFO()
64 
65 ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_execute, 0, 0, 2)
66 	ZEND_ARG_INFO(0, connection)
67 	ZEND_ARG_INFO(0, statement_name)
68 	ZEND_ARG_TYPE_INFO(0, params, IS_ARRAY, 0)
69 ZEND_END_ARG_INFO()
70 
71 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_num_rows, 0, 1, IS_LONG, 0)
72 	ZEND_ARG_INFO(0, result)
73 ZEND_END_ARG_INFO()
74 
75 #define arginfo_pg_numrows arginfo_pg_num_rows
76 
77 #define arginfo_pg_num_fields arginfo_pg_num_rows
78 
79 #define arginfo_pg_numfields arginfo_pg_num_rows
80 
81 #define arginfo_pg_affected_rows arginfo_pg_num_rows
82 
83 #define arginfo_pg_cmdtuples arginfo_pg_num_rows
84 
85 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_last_notice, 0, 1, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_BOOL)
86 	ZEND_ARG_INFO(0, connection)
87 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "PGSQL_NOTICE_LAST")
88 ZEND_END_ARG_INFO()
89 
90 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_field_table, 0, 2, MAY_BE_STRING|MAY_BE_LONG|MAY_BE_FALSE)
91 	ZEND_ARG_INFO(0, result)
92 	ZEND_ARG_TYPE_INFO(0, field, IS_LONG, 0)
93 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, oid_only, _IS_BOOL, 0, "false")
94 ZEND_END_ARG_INFO()
95 
96 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_field_name, 0, 2, IS_STRING, 0)
97 	ZEND_ARG_INFO(0, result)
98 	ZEND_ARG_TYPE_INFO(0, field, IS_LONG, 0)
99 ZEND_END_ARG_INFO()
100 
101 #define arginfo_pg_fieldname arginfo_pg_field_name
102 
103 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_field_size, 0, 2, IS_LONG, 0)
104 	ZEND_ARG_INFO(0, result)
105 	ZEND_ARG_TYPE_INFO(0, field, IS_LONG, 0)
106 ZEND_END_ARG_INFO()
107 
108 #define arginfo_pg_fieldsize arginfo_pg_field_size
109 
110 #define arginfo_pg_field_type arginfo_pg_field_name
111 
112 #define arginfo_pg_fieldtype arginfo_pg_field_name
113 
114 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_field_type_oid, 0, 2, MAY_BE_STRING|MAY_BE_LONG)
115 	ZEND_ARG_INFO(0, result)
116 	ZEND_ARG_TYPE_INFO(0, field, IS_LONG, 0)
117 ZEND_END_ARG_INFO()
118 
119 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_field_num, 0, 2, IS_LONG, 0)
120 	ZEND_ARG_INFO(0, result)
121 	ZEND_ARG_TYPE_INFO(0, field, IS_STRING, 0)
122 ZEND_END_ARG_INFO()
123 
124 #define arginfo_pg_fieldnum arginfo_pg_field_num
125 
126 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_fetch_result, 0, 2, MAY_BE_STRING|MAY_BE_FALSE|MAY_BE_NULL)
127 	ZEND_ARG_INFO(0, result)
128 	ZEND_ARG_INFO(0, row)
129 	ZEND_ARG_TYPE_MASK(0, field, MAY_BE_STRING|MAY_BE_LONG, NULL)
130 ZEND_END_ARG_INFO()
131 
132 #define arginfo_pg_result arginfo_pg_fetch_result
133 
134 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_fetch_row, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
135 	ZEND_ARG_INFO(0, result)
136 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, row, IS_LONG, 1, "null")
137 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "PGSQL_NUM")
138 ZEND_END_ARG_INFO()
139 
140 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_fetch_assoc, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
141 	ZEND_ARG_INFO(0, result)
142 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, row, IS_LONG, 1, "null")
143 ZEND_END_ARG_INFO()
144 
145 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_fetch_array, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
146 	ZEND_ARG_INFO(0, result)
147 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, row, IS_LONG, 1, "null")
148 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "PGSQL_BOTH")
149 ZEND_END_ARG_INFO()
150 
151 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_fetch_object, 0, 1, MAY_BE_OBJECT|MAY_BE_FALSE)
152 	ZEND_ARG_INFO(0, result)
153 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, row, IS_LONG, 1, "null")
154 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, class, IS_STRING, 0, "\"stdClass\"")
155 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, constructor_args, IS_ARRAY, 0, "[]")
156 ZEND_END_ARG_INFO()
157 
158 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_fetch_all, 0, 1, IS_ARRAY, 0)
159 	ZEND_ARG_INFO(0, result)
160 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "PGSQL_ASSOC")
161 ZEND_END_ARG_INFO()
162 
163 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_fetch_all_columns, 0, 1, IS_ARRAY, 0)
164 	ZEND_ARG_INFO(0, result)
165 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, field, IS_LONG, 0, "0")
166 ZEND_END_ARG_INFO()
167 
168 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_result_seek, 0, 2, _IS_BOOL, 0)
169 	ZEND_ARG_INFO(0, result)
170 	ZEND_ARG_TYPE_INFO(0, row, IS_LONG, 0)
171 ZEND_END_ARG_INFO()
172 
173 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_field_prtlen, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
174 	ZEND_ARG_INFO(0, result)
175 	ZEND_ARG_INFO(0, row)
176 	ZEND_ARG_TYPE_MASK(0, field, MAY_BE_STRING|MAY_BE_LONG, NULL)
177 ZEND_END_ARG_INFO()
178 
179 #define arginfo_pg_fieldprtlen arginfo_pg_field_prtlen
180 
181 #define arginfo_pg_field_is_null arginfo_pg_field_prtlen
182 
183 #define arginfo_pg_fieldisnull arginfo_pg_field_prtlen
184 
185 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_free_result, 0, 1, _IS_BOOL, 0)
186 	ZEND_ARG_INFO(0, result)
187 ZEND_END_ARG_INFO()
188 
189 #define arginfo_pg_freeresult arginfo_pg_free_result
190 
191 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_last_oid, 0, 1, MAY_BE_STRING|MAY_BE_LONG|MAY_BE_FALSE)
192 	ZEND_ARG_INFO(0, result)
193 ZEND_END_ARG_INFO()
194 
195 #define arginfo_pg_getlastoid arginfo_pg_last_oid
196 
197 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_trace, 0, 1, _IS_BOOL, 0)
198 	ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
199 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_STRING, 0, "\"w\"")
200 	ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, connection, "null")
201 ZEND_END_ARG_INFO()
202 
203 #define arginfo_pg_untrace arginfo_pg_close
204 
205 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_lo_create, 0, 0, MAY_BE_STRING|MAY_BE_LONG|MAY_BE_FALSE)
206 	ZEND_ARG_INFO(0, connection)
207 	ZEND_ARG_INFO(0, oid)
208 ZEND_END_ARG_INFO()
209 
210 #define arginfo_pg_locreate arginfo_pg_lo_create
211 
212 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_lo_unlink, 0, 1, _IS_BOOL, 0)
213 	ZEND_ARG_INFO(0, connection)
214 	ZEND_ARG_INFO(0, oid)
215 ZEND_END_ARG_INFO()
216 
217 #define arginfo_pg_lounlink arginfo_pg_lo_unlink
218 
219 ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_lo_open, 0, 0, 1)
220 	ZEND_ARG_INFO(0, connection)
221 	ZEND_ARG_INFO(0, oid)
222 	ZEND_ARG_TYPE_INFO(0, mode, IS_STRING, 0)
223 ZEND_END_ARG_INFO()
224 
225 #define arginfo_pg_loopen arginfo_pg_lo_open
226 
227 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_lo_close, 0, 1, _IS_BOOL, 0)
228 	ZEND_ARG_INFO(0, lob)
229 ZEND_END_ARG_INFO()
230 
231 #define arginfo_pg_loclose arginfo_pg_lo_close
232 
233 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_lo_read, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
234 	ZEND_ARG_INFO(0, lob)
235 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "8192")
236 ZEND_END_ARG_INFO()
237 
238 #define arginfo_pg_loread arginfo_pg_lo_read
239 
240 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_lo_write, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
241 	ZEND_ARG_INFO(0, lob)
242 	ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
243 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 1, "null")
244 ZEND_END_ARG_INFO()
245 
246 #define arginfo_pg_lowrite arginfo_pg_lo_write
247 
248 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_lo_read_all, 0, 1, IS_LONG, 0)
249 	ZEND_ARG_INFO(0, lob)
250 ZEND_END_ARG_INFO()
251 
252 #define arginfo_pg_loreadall arginfo_pg_lo_read_all
253 
254 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_lo_import, 0, 1, MAY_BE_STRING|MAY_BE_LONG|MAY_BE_FALSE)
255 	ZEND_ARG_INFO(0, connection)
256 	ZEND_ARG_INFO(0, filename)
257 	ZEND_ARG_INFO(0, oid)
258 ZEND_END_ARG_INFO()
259 
260 #define arginfo_pg_loimport arginfo_pg_lo_import
261 
262 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_lo_export, 0, 1, _IS_BOOL, 0)
263 	ZEND_ARG_INFO(0, connection)
264 	ZEND_ARG_INFO(0, oid)
265 	ZEND_ARG_INFO(0, filename)
266 ZEND_END_ARG_INFO()
267 
268 #define arginfo_pg_loexport arginfo_pg_lo_export
269 
270 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_lo_seek, 0, 2, _IS_BOOL, 0)
271 	ZEND_ARG_INFO(0, lob)
272 	ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0)
273 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, whence, IS_LONG, 0, "SEEK_CUR")
274 ZEND_END_ARG_INFO()
275 
276 #define arginfo_pg_lo_tell arginfo_pg_lo_read_all
277 
278 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_lo_truncate, 0, 2, _IS_BOOL, 0)
279 	ZEND_ARG_INFO(0, lob)
280 	ZEND_ARG_TYPE_INFO(0, size, IS_LONG, 0)
281 ZEND_END_ARG_INFO()
282 
283 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_set_error_verbosity, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
284 	ZEND_ARG_INFO(0, connection)
285 	ZEND_ARG_TYPE_INFO(0, verbosity, IS_LONG, 0)
286 ZEND_END_ARG_INFO()
287 
288 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_set_client_encoding, 0, 1, IS_LONG, 0)
289 	ZEND_ARG_INFO(0, connection)
290 	ZEND_ARG_TYPE_INFO(0, encoding, IS_STRING, 0)
291 ZEND_END_ARG_INFO()
292 
293 #define arginfo_pg_setclientencoding arginfo_pg_set_client_encoding
294 
295 #define arginfo_pg_client_encoding arginfo_pg_dbname
296 
297 #define arginfo_pg_clientencoding arginfo_pg_dbname
298 
299 #define arginfo_pg_end_copy arginfo_pg_close
300 
301 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_put_line, 0, 1, _IS_BOOL, 0)
302 	ZEND_ARG_INFO(0, connection)
303 	ZEND_ARG_TYPE_INFO(0, query, IS_STRING, 0)
304 ZEND_END_ARG_INFO()
305 
306 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_copy_to, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
307 	ZEND_ARG_INFO(0, connection)
308 	ZEND_ARG_TYPE_INFO(0, table_name, IS_STRING, 0)
309 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, separator, IS_STRING, 0, "\"\\t\"")
310 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, null_as, IS_STRING, 0, "\"\\\\\\\\N\"")
311 ZEND_END_ARG_INFO()
312 
313 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_copy_from, 0, 3, _IS_BOOL, 0)
314 	ZEND_ARG_INFO(0, connection)
315 	ZEND_ARG_TYPE_INFO(0, table_name, IS_STRING, 0)
316 	ZEND_ARG_TYPE_INFO(0, rows, IS_ARRAY, 0)
317 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, separator, IS_STRING, 0, "\"\\t\"")
318 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, null_as, IS_STRING, 0, "\"\\\\\\\\N\"")
319 ZEND_END_ARG_INFO()
320 
321 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_escape_string, 0, 1, IS_STRING, 0)
322 	ZEND_ARG_INFO(0, connection)
323 	ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
324 ZEND_END_ARG_INFO()
325 
326 #define arginfo_pg_escape_bytea arginfo_pg_escape_string
327 
328 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_unescape_bytea, 0, 1, IS_STRING, 0)
329 	ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
330 ZEND_END_ARG_INFO()
331 
332 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_escape_literal, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
333 	ZEND_ARG_INFO(0, connection)
334 	ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
335 ZEND_END_ARG_INFO()
336 
337 #define arginfo_pg_escape_identifier arginfo_pg_escape_literal
338 
339 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_result_error, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
340 	ZEND_ARG_INFO(0, result)
341 ZEND_END_ARG_INFO()
342 
343 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_result_error_field, 0, 2, MAY_BE_STRING|MAY_BE_FALSE|MAY_BE_NULL)
344 	ZEND_ARG_INFO(0, result)
345 	ZEND_ARG_TYPE_INFO(0, field_code, IS_LONG, 0)
346 ZEND_END_ARG_INFO()
347 
348 #define arginfo_pg_connection_status arginfo_pg_connect_poll
349 
350 #define arginfo_pg_transaction_status arginfo_pg_connect_poll
351 
352 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_connection_reset, 0, 1, _IS_BOOL, 0)
353 	ZEND_ARG_INFO(0, connection)
354 ZEND_END_ARG_INFO()
355 
356 #define arginfo_pg_cancel_query arginfo_pg_connection_reset
357 
358 #define arginfo_pg_connection_busy arginfo_pg_connection_reset
359 
360 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_send_query, 0, 2, MAY_BE_LONG|MAY_BE_BOOL)
361 	ZEND_ARG_INFO(0, connection)
362 	ZEND_ARG_TYPE_INFO(0, query, IS_STRING, 0)
363 ZEND_END_ARG_INFO()
364 
365 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_send_query_params, 0, 3, MAY_BE_LONG|MAY_BE_BOOL)
366 	ZEND_ARG_INFO(0, connection)
367 	ZEND_ARG_TYPE_INFO(0, query, IS_STRING, 0)
368 	ZEND_ARG_TYPE_INFO(0, params, IS_ARRAY, 0)
369 ZEND_END_ARG_INFO()
370 
371 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_send_prepare, 0, 3, MAY_BE_LONG|MAY_BE_BOOL)
372 	ZEND_ARG_INFO(0, connection)
373 	ZEND_ARG_TYPE_INFO(0, statement_name, IS_STRING, 0)
374 	ZEND_ARG_TYPE_INFO(0, query, IS_STRING, 0)
375 ZEND_END_ARG_INFO()
376 
377 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_send_execute, 0, 3, MAY_BE_LONG|MAY_BE_BOOL)
378 	ZEND_ARG_INFO(0, connection)
379 	ZEND_ARG_TYPE_INFO(0, statement_name, IS_STRING, 0)
380 	ZEND_ARG_TYPE_INFO(0, params, IS_ARRAY, 0)
381 ZEND_END_ARG_INFO()
382 
383 ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_get_result, 0, 0, 1)
384 	ZEND_ARG_INFO(0, connection)
385 ZEND_END_ARG_INFO()
386 
387 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_result_status, 0, 1, MAY_BE_STRING|MAY_BE_LONG)
388 	ZEND_ARG_INFO(0, result)
389 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "PGSQL_STATUS_LONG")
390 ZEND_END_ARG_INFO()
391 
392 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_get_notify, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
393 	ZEND_ARG_INFO(0, connection)
394 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "PGSQL_ASSOC")
395 ZEND_END_ARG_INFO()
396 
397 #define arginfo_pg_get_pid arginfo_pg_connect_poll
398 
399 #define arginfo_pg_socket arginfo_pg_get_result
400 
401 #define arginfo_pg_consume_input arginfo_pg_connection_reset
402 
403 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_flush, 0, 1, MAY_BE_LONG|MAY_BE_BOOL)
404 	ZEND_ARG_INFO(0, connection)
405 ZEND_END_ARG_INFO()
406 
407 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_meta_data, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
408 	ZEND_ARG_INFO(0, connection)
409 	ZEND_ARG_TYPE_INFO(0, table_name, IS_STRING, 0)
410 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, extended, _IS_BOOL, 0, "false")
411 ZEND_END_ARG_INFO()
412 
413 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_convert, 0, 3, MAY_BE_ARRAY|MAY_BE_FALSE)
414 	ZEND_ARG_INFO(0, connection)
415 	ZEND_ARG_TYPE_INFO(0, table_name, IS_STRING, 0)
416 	ZEND_ARG_TYPE_INFO(0, values, IS_ARRAY, 0)
417 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
418 ZEND_END_ARG_INFO()
419 
420 ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_insert, 0, 0, 3)
421 	ZEND_ARG_INFO(0, connection)
422 	ZEND_ARG_TYPE_INFO(0, table_name, IS_STRING, 0)
423 	ZEND_ARG_TYPE_INFO(0, values, IS_ARRAY, 0)
424 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "PGSQL_DML_EXEC")
425 ZEND_END_ARG_INFO()
426 
427 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_update, 0, 4, MAY_BE_STRING|MAY_BE_BOOL)
428 	ZEND_ARG_INFO(0, connection)
429 	ZEND_ARG_TYPE_INFO(0, table_name, IS_STRING, 0)
430 	ZEND_ARG_TYPE_INFO(0, values, IS_ARRAY, 0)
431 	ZEND_ARG_TYPE_INFO(0, conditions, IS_ARRAY, 0)
432 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "PGSQL_DML_EXEC")
433 ZEND_END_ARG_INFO()
434 
435 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_delete, 0, 3, MAY_BE_STRING|MAY_BE_BOOL)
436 	ZEND_ARG_INFO(0, connection)
437 	ZEND_ARG_TYPE_INFO(0, table_name, IS_STRING, 0)
438 	ZEND_ARG_TYPE_INFO(0, conditions, IS_ARRAY, 0)
439 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "PGSQL_DML_EXEC")
440 ZEND_END_ARG_INFO()
441 
442 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_select, 0, 3, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_FALSE)
443 	ZEND_ARG_INFO(0, connection)
444 	ZEND_ARG_TYPE_INFO(0, table_name, IS_STRING, 0)
445 	ZEND_ARG_TYPE_INFO(0, conditions, IS_ARRAY, 0)
446 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "PGSQL_DML_EXEC")
447 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "PGSQL_ASSOC")
448 ZEND_END_ARG_INFO()
449 
450 
451 ZEND_FUNCTION(pg_connect);
452 ZEND_FUNCTION(pg_pconnect);
453 ZEND_FUNCTION(pg_connect_poll);
454 ZEND_FUNCTION(pg_close);
455 ZEND_FUNCTION(pg_dbname);
456 ZEND_FUNCTION(pg_last_error);
457 ZEND_FUNCTION(pg_options);
458 ZEND_FUNCTION(pg_port);
459 ZEND_FUNCTION(pg_tty);
460 ZEND_FUNCTION(pg_host);
461 ZEND_FUNCTION(pg_version);
462 ZEND_FUNCTION(pg_parameter_status);
463 ZEND_FUNCTION(pg_ping);
464 ZEND_FUNCTION(pg_query);
465 ZEND_FUNCTION(pg_query_params);
466 ZEND_FUNCTION(pg_prepare);
467 ZEND_FUNCTION(pg_execute);
468 ZEND_FUNCTION(pg_num_rows);
469 ZEND_FUNCTION(pg_num_fields);
470 ZEND_FUNCTION(pg_affected_rows);
471 ZEND_FUNCTION(pg_last_notice);
472 ZEND_FUNCTION(pg_field_table);
473 ZEND_FUNCTION(pg_field_name);
474 ZEND_FUNCTION(pg_field_size);
475 ZEND_FUNCTION(pg_field_type);
476 ZEND_FUNCTION(pg_field_type_oid);
477 ZEND_FUNCTION(pg_field_num);
478 ZEND_FUNCTION(pg_fetch_result);
479 ZEND_FUNCTION(pg_fetch_row);
480 ZEND_FUNCTION(pg_fetch_assoc);
481 ZEND_FUNCTION(pg_fetch_array);
482 ZEND_FUNCTION(pg_fetch_object);
483 ZEND_FUNCTION(pg_fetch_all);
484 ZEND_FUNCTION(pg_fetch_all_columns);
485 ZEND_FUNCTION(pg_result_seek);
486 ZEND_FUNCTION(pg_field_prtlen);
487 ZEND_FUNCTION(pg_field_is_null);
488 ZEND_FUNCTION(pg_free_result);
489 ZEND_FUNCTION(pg_last_oid);
490 ZEND_FUNCTION(pg_trace);
491 ZEND_FUNCTION(pg_untrace);
492 ZEND_FUNCTION(pg_lo_create);
493 ZEND_FUNCTION(pg_lo_unlink);
494 ZEND_FUNCTION(pg_lo_open);
495 ZEND_FUNCTION(pg_lo_close);
496 ZEND_FUNCTION(pg_lo_read);
497 ZEND_FUNCTION(pg_lo_write);
498 ZEND_FUNCTION(pg_lo_read_all);
499 ZEND_FUNCTION(pg_lo_import);
500 ZEND_FUNCTION(pg_lo_export);
501 ZEND_FUNCTION(pg_lo_seek);
502 ZEND_FUNCTION(pg_lo_tell);
503 ZEND_FUNCTION(pg_lo_truncate);
504 ZEND_FUNCTION(pg_set_error_verbosity);
505 ZEND_FUNCTION(pg_set_client_encoding);
506 ZEND_FUNCTION(pg_client_encoding);
507 ZEND_FUNCTION(pg_end_copy);
508 ZEND_FUNCTION(pg_put_line);
509 ZEND_FUNCTION(pg_copy_to);
510 ZEND_FUNCTION(pg_copy_from);
511 ZEND_FUNCTION(pg_escape_string);
512 ZEND_FUNCTION(pg_escape_bytea);
513 ZEND_FUNCTION(pg_unescape_bytea);
514 ZEND_FUNCTION(pg_escape_literal);
515 ZEND_FUNCTION(pg_escape_identifier);
516 ZEND_FUNCTION(pg_result_error);
517 ZEND_FUNCTION(pg_result_error_field);
518 ZEND_FUNCTION(pg_connection_status);
519 ZEND_FUNCTION(pg_transaction_status);
520 ZEND_FUNCTION(pg_connection_reset);
521 ZEND_FUNCTION(pg_cancel_query);
522 ZEND_FUNCTION(pg_connection_busy);
523 ZEND_FUNCTION(pg_send_query);
524 ZEND_FUNCTION(pg_send_query_params);
525 ZEND_FUNCTION(pg_send_prepare);
526 ZEND_FUNCTION(pg_send_execute);
527 ZEND_FUNCTION(pg_get_result);
528 ZEND_FUNCTION(pg_result_status);
529 ZEND_FUNCTION(pg_get_notify);
530 ZEND_FUNCTION(pg_get_pid);
531 ZEND_FUNCTION(pg_socket);
532 ZEND_FUNCTION(pg_consume_input);
533 ZEND_FUNCTION(pg_flush);
534 ZEND_FUNCTION(pg_meta_data);
535 ZEND_FUNCTION(pg_convert);
536 ZEND_FUNCTION(pg_insert);
537 ZEND_FUNCTION(pg_update);
538 ZEND_FUNCTION(pg_delete);
539 ZEND_FUNCTION(pg_select);
540 
541 
542 static const zend_function_entry ext_functions[] = {
543 	ZEND_FE(pg_connect, arginfo_pg_connect)
544 	ZEND_FE(pg_pconnect, arginfo_pg_pconnect)
545 	ZEND_FE(pg_connect_poll, arginfo_pg_connect_poll)
546 	ZEND_FE(pg_close, arginfo_pg_close)
547 	ZEND_FE(pg_dbname, arginfo_pg_dbname)
548 	ZEND_FE(pg_last_error, arginfo_pg_last_error)
549 	ZEND_DEP_FALIAS(pg_errormessage, pg_last_error, arginfo_pg_errormessage)
550 	ZEND_FE(pg_options, arginfo_pg_options)
551 	ZEND_FE(pg_port, arginfo_pg_port)
552 	ZEND_FE(pg_tty, arginfo_pg_tty)
553 	ZEND_FE(pg_host, arginfo_pg_host)
554 	ZEND_FE(pg_version, arginfo_pg_version)
555 	ZEND_FE(pg_parameter_status, arginfo_pg_parameter_status)
556 	ZEND_FE(pg_ping, arginfo_pg_ping)
557 	ZEND_FE(pg_query, arginfo_pg_query)
558 	ZEND_FALIAS(pg_exec, pg_query, arginfo_pg_exec)
559 	ZEND_FE(pg_query_params, arginfo_pg_query_params)
560 	ZEND_FE(pg_prepare, arginfo_pg_prepare)
561 	ZEND_FE(pg_execute, arginfo_pg_execute)
562 	ZEND_FE(pg_num_rows, arginfo_pg_num_rows)
563 	ZEND_DEP_FALIAS(pg_numrows, pg_num_rows, arginfo_pg_numrows)
564 	ZEND_FE(pg_num_fields, arginfo_pg_num_fields)
565 	ZEND_DEP_FALIAS(pg_numfields, pg_num_fields, arginfo_pg_numfields)
566 	ZEND_FE(pg_affected_rows, arginfo_pg_affected_rows)
567 	ZEND_DEP_FALIAS(pg_cmdtuples, pg_affected_rows, arginfo_pg_cmdtuples)
568 	ZEND_FE(pg_last_notice, arginfo_pg_last_notice)
569 	ZEND_FE(pg_field_table, arginfo_pg_field_table)
570 	ZEND_FE(pg_field_name, arginfo_pg_field_name)
571 	ZEND_DEP_FALIAS(pg_fieldname, pg_field_name, arginfo_pg_fieldname)
572 	ZEND_FE(pg_field_size, arginfo_pg_field_size)
573 	ZEND_DEP_FALIAS(pg_fieldsize, pg_field_size, arginfo_pg_fieldsize)
574 	ZEND_FE(pg_field_type, arginfo_pg_field_type)
575 	ZEND_DEP_FALIAS(pg_fieldtype, pg_field_type, arginfo_pg_fieldtype)
576 	ZEND_FE(pg_field_type_oid, arginfo_pg_field_type_oid)
577 	ZEND_FE(pg_field_num, arginfo_pg_field_num)
578 	ZEND_DEP_FALIAS(pg_fieldnum, pg_field_num, arginfo_pg_fieldnum)
579 	ZEND_FE(pg_fetch_result, arginfo_pg_fetch_result)
580 	ZEND_DEP_FALIAS(pg_result, pg_fetch_result, arginfo_pg_result)
581 	ZEND_FE(pg_fetch_row, arginfo_pg_fetch_row)
582 	ZEND_FE(pg_fetch_assoc, arginfo_pg_fetch_assoc)
583 	ZEND_FE(pg_fetch_array, arginfo_pg_fetch_array)
584 	ZEND_FE(pg_fetch_object, arginfo_pg_fetch_object)
585 	ZEND_FE(pg_fetch_all, arginfo_pg_fetch_all)
586 	ZEND_FE(pg_fetch_all_columns, arginfo_pg_fetch_all_columns)
587 	ZEND_FE(pg_result_seek, arginfo_pg_result_seek)
588 	ZEND_FE(pg_field_prtlen, arginfo_pg_field_prtlen)
589 	ZEND_DEP_FALIAS(pg_fieldprtlen, pg_field_prtlen, arginfo_pg_fieldprtlen)
590 	ZEND_FE(pg_field_is_null, arginfo_pg_field_is_null)
591 	ZEND_DEP_FALIAS(pg_fieldisnull, pg_field_is_null, arginfo_pg_fieldisnull)
592 	ZEND_FE(pg_free_result, arginfo_pg_free_result)
593 	ZEND_DEP_FALIAS(pg_freeresult, pg_free_result, arginfo_pg_freeresult)
594 	ZEND_FE(pg_last_oid, arginfo_pg_last_oid)
595 	ZEND_DEP_FALIAS(pg_getlastoid, pg_last_oid, arginfo_pg_getlastoid)
596 	ZEND_FE(pg_trace, arginfo_pg_trace)
597 	ZEND_FE(pg_untrace, arginfo_pg_untrace)
598 	ZEND_FE(pg_lo_create, arginfo_pg_lo_create)
599 	ZEND_DEP_FALIAS(pg_locreate, pg_lo_create, arginfo_pg_locreate)
600 	ZEND_FE(pg_lo_unlink, arginfo_pg_lo_unlink)
601 	ZEND_DEP_FALIAS(pg_lounlink, pg_lo_unlink, arginfo_pg_lounlink)
602 	ZEND_FE(pg_lo_open, arginfo_pg_lo_open)
603 	ZEND_DEP_FALIAS(pg_loopen, pg_lo_open, arginfo_pg_loopen)
604 	ZEND_FE(pg_lo_close, arginfo_pg_lo_close)
605 	ZEND_DEP_FALIAS(pg_loclose, pg_lo_close, arginfo_pg_loclose)
606 	ZEND_FE(pg_lo_read, arginfo_pg_lo_read)
607 	ZEND_DEP_FALIAS(pg_loread, pg_lo_read, arginfo_pg_loread)
608 	ZEND_FE(pg_lo_write, arginfo_pg_lo_write)
609 	ZEND_DEP_FALIAS(pg_lowrite, pg_lo_write, arginfo_pg_lowrite)
610 	ZEND_FE(pg_lo_read_all, arginfo_pg_lo_read_all)
611 	ZEND_DEP_FALIAS(pg_loreadall, pg_lo_read_all, arginfo_pg_loreadall)
612 	ZEND_FE(pg_lo_import, arginfo_pg_lo_import)
613 	ZEND_DEP_FALIAS(pg_loimport, pg_lo_import, arginfo_pg_loimport)
614 	ZEND_FE(pg_lo_export, arginfo_pg_lo_export)
615 	ZEND_DEP_FALIAS(pg_loexport, pg_lo_export, arginfo_pg_loexport)
616 	ZEND_FE(pg_lo_seek, arginfo_pg_lo_seek)
617 	ZEND_FE(pg_lo_tell, arginfo_pg_lo_tell)
618 	ZEND_FE(pg_lo_truncate, arginfo_pg_lo_truncate)
619 	ZEND_FE(pg_set_error_verbosity, arginfo_pg_set_error_verbosity)
620 	ZEND_FE(pg_set_client_encoding, arginfo_pg_set_client_encoding)
621 	ZEND_DEP_FALIAS(pg_setclientencoding, pg_set_client_encoding, arginfo_pg_setclientencoding)
622 	ZEND_FE(pg_client_encoding, arginfo_pg_client_encoding)
623 	ZEND_DEP_FALIAS(pg_clientencoding, pg_client_encoding, arginfo_pg_clientencoding)
624 	ZEND_FE(pg_end_copy, arginfo_pg_end_copy)
625 	ZEND_FE(pg_put_line, arginfo_pg_put_line)
626 	ZEND_FE(pg_copy_to, arginfo_pg_copy_to)
627 	ZEND_FE(pg_copy_from, arginfo_pg_copy_from)
628 	ZEND_FE(pg_escape_string, arginfo_pg_escape_string)
629 	ZEND_FE(pg_escape_bytea, arginfo_pg_escape_bytea)
630 	ZEND_FE(pg_unescape_bytea, arginfo_pg_unescape_bytea)
631 	ZEND_FE(pg_escape_literal, arginfo_pg_escape_literal)
632 	ZEND_FE(pg_escape_identifier, arginfo_pg_escape_identifier)
633 	ZEND_FE(pg_result_error, arginfo_pg_result_error)
634 	ZEND_FE(pg_result_error_field, arginfo_pg_result_error_field)
635 	ZEND_FE(pg_connection_status, arginfo_pg_connection_status)
636 	ZEND_FE(pg_transaction_status, arginfo_pg_transaction_status)
637 	ZEND_FE(pg_connection_reset, arginfo_pg_connection_reset)
638 	ZEND_FE(pg_cancel_query, arginfo_pg_cancel_query)
639 	ZEND_FE(pg_connection_busy, arginfo_pg_connection_busy)
640 	ZEND_FE(pg_send_query, arginfo_pg_send_query)
641 	ZEND_FE(pg_send_query_params, arginfo_pg_send_query_params)
642 	ZEND_FE(pg_send_prepare, arginfo_pg_send_prepare)
643 	ZEND_FE(pg_send_execute, arginfo_pg_send_execute)
644 	ZEND_FE(pg_get_result, arginfo_pg_get_result)
645 	ZEND_FE(pg_result_status, arginfo_pg_result_status)
646 	ZEND_FE(pg_get_notify, arginfo_pg_get_notify)
647 	ZEND_FE(pg_get_pid, arginfo_pg_get_pid)
648 	ZEND_FE(pg_socket, arginfo_pg_socket)
649 	ZEND_FE(pg_consume_input, arginfo_pg_consume_input)
650 	ZEND_FE(pg_flush, arginfo_pg_flush)
651 	ZEND_FE(pg_meta_data, arginfo_pg_meta_data)
652 	ZEND_FE(pg_convert, arginfo_pg_convert)
653 	ZEND_FE(pg_insert, arginfo_pg_insert)
654 	ZEND_FE(pg_update, arginfo_pg_update)
655 	ZEND_FE(pg_delete, arginfo_pg_delete)
656 	ZEND_FE(pg_select, arginfo_pg_select)
657 	ZEND_FE_END
658 };
659