1 /*-------------------------------------------------------------------------
2  *
3  * builtins.h
4  *	  Declarations for operations on built-in types.
5  *
6  *
7  * Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * src/include/utils/builtins.h
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef BUILTINS_H
15 #define BUILTINS_H
16 
17 #include "fmgr.h"
18 #include "nodes/parsenodes.h"
19 #include "utils/sortsupport.h"
20 
21 /*
22  *		Defined in adt/
23  */
24 
25 /* acl.c */
26 extern Datum has_any_column_privilege_name_name(PG_FUNCTION_ARGS);
27 extern Datum has_any_column_privilege_name_id(PG_FUNCTION_ARGS);
28 extern Datum has_any_column_privilege_id_name(PG_FUNCTION_ARGS);
29 extern Datum has_any_column_privilege_id_id(PG_FUNCTION_ARGS);
30 extern Datum has_any_column_privilege_name(PG_FUNCTION_ARGS);
31 extern Datum has_any_column_privilege_id(PG_FUNCTION_ARGS);
32 extern Datum has_column_privilege_name_name_name(PG_FUNCTION_ARGS);
33 extern Datum has_column_privilege_name_name_attnum(PG_FUNCTION_ARGS);
34 extern Datum has_column_privilege_name_id_name(PG_FUNCTION_ARGS);
35 extern Datum has_column_privilege_name_id_attnum(PG_FUNCTION_ARGS);
36 extern Datum has_column_privilege_id_name_name(PG_FUNCTION_ARGS);
37 extern Datum has_column_privilege_id_name_attnum(PG_FUNCTION_ARGS);
38 extern Datum has_column_privilege_id_id_name(PG_FUNCTION_ARGS);
39 extern Datum has_column_privilege_id_id_attnum(PG_FUNCTION_ARGS);
40 extern Datum has_column_privilege_name_name(PG_FUNCTION_ARGS);
41 extern Datum has_column_privilege_name_attnum(PG_FUNCTION_ARGS);
42 extern Datum has_column_privilege_id_name(PG_FUNCTION_ARGS);
43 extern Datum has_column_privilege_id_attnum(PG_FUNCTION_ARGS);
44 extern Datum has_table_privilege_name_name(PG_FUNCTION_ARGS);
45 extern Datum has_table_privilege_name_id(PG_FUNCTION_ARGS);
46 extern Datum has_table_privilege_id_name(PG_FUNCTION_ARGS);
47 extern Datum has_table_privilege_id_id(PG_FUNCTION_ARGS);
48 extern Datum has_table_privilege_name(PG_FUNCTION_ARGS);
49 extern Datum has_table_privilege_id(PG_FUNCTION_ARGS);
50 extern Datum has_sequence_privilege_name_name(PG_FUNCTION_ARGS);
51 extern Datum has_sequence_privilege_name_id(PG_FUNCTION_ARGS);
52 extern Datum has_sequence_privilege_id_name(PG_FUNCTION_ARGS);
53 extern Datum has_sequence_privilege_id_id(PG_FUNCTION_ARGS);
54 extern Datum has_sequence_privilege_name(PG_FUNCTION_ARGS);
55 extern Datum has_sequence_privilege_id(PG_FUNCTION_ARGS);
56 extern Datum has_database_privilege_name_name(PG_FUNCTION_ARGS);
57 extern Datum has_database_privilege_name_id(PG_FUNCTION_ARGS);
58 extern Datum has_database_privilege_id_name(PG_FUNCTION_ARGS);
59 extern Datum has_database_privilege_id_id(PG_FUNCTION_ARGS);
60 extern Datum has_database_privilege_name(PG_FUNCTION_ARGS);
61 extern Datum has_database_privilege_id(PG_FUNCTION_ARGS);
62 extern Datum has_foreign_data_wrapper_privilege_name_name(PG_FUNCTION_ARGS);
63 extern Datum has_foreign_data_wrapper_privilege_name_id(PG_FUNCTION_ARGS);
64 extern Datum has_foreign_data_wrapper_privilege_id_name(PG_FUNCTION_ARGS);
65 extern Datum has_foreign_data_wrapper_privilege_id_id(PG_FUNCTION_ARGS);
66 extern Datum has_foreign_data_wrapper_privilege_name(PG_FUNCTION_ARGS);
67 extern Datum has_foreign_data_wrapper_privilege_id(PG_FUNCTION_ARGS);
68 extern Datum has_function_privilege_name_name(PG_FUNCTION_ARGS);
69 extern Datum has_function_privilege_name_id(PG_FUNCTION_ARGS);
70 extern Datum has_function_privilege_id_name(PG_FUNCTION_ARGS);
71 extern Datum has_function_privilege_id_id(PG_FUNCTION_ARGS);
72 extern Datum has_function_privilege_name(PG_FUNCTION_ARGS);
73 extern Datum has_function_privilege_id(PG_FUNCTION_ARGS);
74 extern Datum has_language_privilege_name_name(PG_FUNCTION_ARGS);
75 extern Datum has_language_privilege_name_id(PG_FUNCTION_ARGS);
76 extern Datum has_language_privilege_id_name(PG_FUNCTION_ARGS);
77 extern Datum has_language_privilege_id_id(PG_FUNCTION_ARGS);
78 extern Datum has_language_privilege_name(PG_FUNCTION_ARGS);
79 extern Datum has_language_privilege_id(PG_FUNCTION_ARGS);
80 extern Datum has_schema_privilege_name_name(PG_FUNCTION_ARGS);
81 extern Datum has_schema_privilege_name_id(PG_FUNCTION_ARGS);
82 extern Datum has_schema_privilege_id_name(PG_FUNCTION_ARGS);
83 extern Datum has_schema_privilege_id_id(PG_FUNCTION_ARGS);
84 extern Datum has_schema_privilege_name(PG_FUNCTION_ARGS);
85 extern Datum has_schema_privilege_id(PG_FUNCTION_ARGS);
86 extern Datum has_server_privilege_name_name(PG_FUNCTION_ARGS);
87 extern Datum has_server_privilege_name_id(PG_FUNCTION_ARGS);
88 extern Datum has_server_privilege_id_name(PG_FUNCTION_ARGS);
89 extern Datum has_server_privilege_id_id(PG_FUNCTION_ARGS);
90 extern Datum has_server_privilege_name(PG_FUNCTION_ARGS);
91 extern Datum has_server_privilege_id(PG_FUNCTION_ARGS);
92 extern Datum has_tablespace_privilege_name_name(PG_FUNCTION_ARGS);
93 extern Datum has_tablespace_privilege_name_id(PG_FUNCTION_ARGS);
94 extern Datum has_tablespace_privilege_id_name(PG_FUNCTION_ARGS);
95 extern Datum has_tablespace_privilege_id_id(PG_FUNCTION_ARGS);
96 extern Datum has_tablespace_privilege_name(PG_FUNCTION_ARGS);
97 extern Datum has_tablespace_privilege_id(PG_FUNCTION_ARGS);
98 extern Datum has_type_privilege_name_name(PG_FUNCTION_ARGS);
99 extern Datum has_type_privilege_name_id(PG_FUNCTION_ARGS);
100 extern Datum has_type_privilege_id_name(PG_FUNCTION_ARGS);
101 extern Datum has_type_privilege_id_id(PG_FUNCTION_ARGS);
102 extern Datum has_type_privilege_name(PG_FUNCTION_ARGS);
103 extern Datum has_type_privilege_id(PG_FUNCTION_ARGS);
104 extern Datum pg_has_role_name_name(PG_FUNCTION_ARGS);
105 extern Datum pg_has_role_name_id(PG_FUNCTION_ARGS);
106 extern Datum pg_has_role_id_name(PG_FUNCTION_ARGS);
107 extern Datum pg_has_role_id_id(PG_FUNCTION_ARGS);
108 extern Datum pg_has_role_name(PG_FUNCTION_ARGS);
109 extern Datum pg_has_role_id(PG_FUNCTION_ARGS);
110 
111 /* amutils.c */
112 extern Datum pg_indexam_has_property(PG_FUNCTION_ARGS);
113 extern Datum pg_index_has_property(PG_FUNCTION_ARGS);
114 extern Datum pg_index_column_has_property(PG_FUNCTION_ARGS);
115 
116 /* bool.c */
117 extern Datum boolin(PG_FUNCTION_ARGS);
118 extern Datum boolout(PG_FUNCTION_ARGS);
119 extern Datum boolrecv(PG_FUNCTION_ARGS);
120 extern Datum boolsend(PG_FUNCTION_ARGS);
121 extern Datum booltext(PG_FUNCTION_ARGS);
122 extern Datum booleq(PG_FUNCTION_ARGS);
123 extern Datum boolne(PG_FUNCTION_ARGS);
124 extern Datum boollt(PG_FUNCTION_ARGS);
125 extern Datum boolgt(PG_FUNCTION_ARGS);
126 extern Datum boolle(PG_FUNCTION_ARGS);
127 extern Datum boolge(PG_FUNCTION_ARGS);
128 extern Datum booland_statefunc(PG_FUNCTION_ARGS);
129 extern Datum boolor_statefunc(PG_FUNCTION_ARGS);
130 extern Datum bool_accum(PG_FUNCTION_ARGS);
131 extern Datum bool_accum_inv(PG_FUNCTION_ARGS);
132 extern Datum bool_alltrue(PG_FUNCTION_ARGS);
133 extern Datum bool_anytrue(PG_FUNCTION_ARGS);
134 extern bool parse_bool(const char *value, bool *result);
135 extern bool parse_bool_with_len(const char *value, size_t len, bool *result);
136 
137 /* char.c */
138 extern Datum charin(PG_FUNCTION_ARGS);
139 extern Datum charout(PG_FUNCTION_ARGS);
140 extern Datum charrecv(PG_FUNCTION_ARGS);
141 extern Datum charsend(PG_FUNCTION_ARGS);
142 extern Datum chareq(PG_FUNCTION_ARGS);
143 extern Datum charne(PG_FUNCTION_ARGS);
144 extern Datum charlt(PG_FUNCTION_ARGS);
145 extern Datum charle(PG_FUNCTION_ARGS);
146 extern Datum chargt(PG_FUNCTION_ARGS);
147 extern Datum charge(PG_FUNCTION_ARGS);
148 extern Datum chartoi4(PG_FUNCTION_ARGS);
149 extern Datum i4tochar(PG_FUNCTION_ARGS);
150 extern Datum text_char(PG_FUNCTION_ARGS);
151 extern Datum char_text(PG_FUNCTION_ARGS);
152 
153 /* domains.c */
154 extern Datum domain_in(PG_FUNCTION_ARGS);
155 extern Datum domain_recv(PG_FUNCTION_ARGS);
156 extern void domain_check(Datum value, bool isnull, Oid domainType,
157 			 void **extra, MemoryContext mcxt);
158 extern int	errdatatype(Oid datatypeOid);
159 extern int	errdomainconstraint(Oid datatypeOid, const char *conname);
160 
161 /* encode.c */
162 extern Datum binary_encode(PG_FUNCTION_ARGS);
163 extern Datum binary_decode(PG_FUNCTION_ARGS);
164 extern unsigned hex_encode(const char *src, unsigned len, char *dst);
165 extern unsigned hex_decode(const char *src, unsigned len, char *dst);
166 
167 /* enum.c */
168 extern Datum enum_in(PG_FUNCTION_ARGS);
169 extern Datum enum_out(PG_FUNCTION_ARGS);
170 extern Datum enum_recv(PG_FUNCTION_ARGS);
171 extern Datum enum_send(PG_FUNCTION_ARGS);
172 extern Datum enum_lt(PG_FUNCTION_ARGS);
173 extern Datum enum_le(PG_FUNCTION_ARGS);
174 extern Datum enum_eq(PG_FUNCTION_ARGS);
175 extern Datum enum_ne(PG_FUNCTION_ARGS);
176 extern Datum enum_ge(PG_FUNCTION_ARGS);
177 extern Datum enum_gt(PG_FUNCTION_ARGS);
178 extern Datum enum_cmp(PG_FUNCTION_ARGS);
179 extern Datum enum_smaller(PG_FUNCTION_ARGS);
180 extern Datum enum_larger(PG_FUNCTION_ARGS);
181 extern Datum enum_first(PG_FUNCTION_ARGS);
182 extern Datum enum_last(PG_FUNCTION_ARGS);
183 extern Datum enum_range_bounds(PG_FUNCTION_ARGS);
184 extern Datum enum_range_all(PG_FUNCTION_ARGS);
185 
186 /* int.c */
187 extern Datum int2in(PG_FUNCTION_ARGS);
188 extern Datum int2out(PG_FUNCTION_ARGS);
189 extern Datum int2recv(PG_FUNCTION_ARGS);
190 extern Datum int2send(PG_FUNCTION_ARGS);
191 extern Datum int2vectorin(PG_FUNCTION_ARGS);
192 extern Datum int2vectorout(PG_FUNCTION_ARGS);
193 extern Datum int2vectorrecv(PG_FUNCTION_ARGS);
194 extern Datum int2vectorsend(PG_FUNCTION_ARGS);
195 extern Datum int2vectoreq(PG_FUNCTION_ARGS);
196 extern Datum int4in(PG_FUNCTION_ARGS);
197 extern Datum int4out(PG_FUNCTION_ARGS);
198 extern Datum int4recv(PG_FUNCTION_ARGS);
199 extern Datum int4send(PG_FUNCTION_ARGS);
200 extern Datum i2toi4(PG_FUNCTION_ARGS);
201 extern Datum i4toi2(PG_FUNCTION_ARGS);
202 extern Datum int4_bool(PG_FUNCTION_ARGS);
203 extern Datum bool_int4(PG_FUNCTION_ARGS);
204 extern Datum int4eq(PG_FUNCTION_ARGS);
205 extern Datum int4ne(PG_FUNCTION_ARGS);
206 extern Datum int4lt(PG_FUNCTION_ARGS);
207 extern Datum int4le(PG_FUNCTION_ARGS);
208 extern Datum int4gt(PG_FUNCTION_ARGS);
209 extern Datum int4ge(PG_FUNCTION_ARGS);
210 extern Datum int2eq(PG_FUNCTION_ARGS);
211 extern Datum int2ne(PG_FUNCTION_ARGS);
212 extern Datum int2lt(PG_FUNCTION_ARGS);
213 extern Datum int2le(PG_FUNCTION_ARGS);
214 extern Datum int2gt(PG_FUNCTION_ARGS);
215 extern Datum int2ge(PG_FUNCTION_ARGS);
216 extern Datum int24eq(PG_FUNCTION_ARGS);
217 extern Datum int24ne(PG_FUNCTION_ARGS);
218 extern Datum int24lt(PG_FUNCTION_ARGS);
219 extern Datum int24le(PG_FUNCTION_ARGS);
220 extern Datum int24gt(PG_FUNCTION_ARGS);
221 extern Datum int24ge(PG_FUNCTION_ARGS);
222 extern Datum int42eq(PG_FUNCTION_ARGS);
223 extern Datum int42ne(PG_FUNCTION_ARGS);
224 extern Datum int42lt(PG_FUNCTION_ARGS);
225 extern Datum int42le(PG_FUNCTION_ARGS);
226 extern Datum int42gt(PG_FUNCTION_ARGS);
227 extern Datum int42ge(PG_FUNCTION_ARGS);
228 extern Datum int4um(PG_FUNCTION_ARGS);
229 extern Datum int4up(PG_FUNCTION_ARGS);
230 extern Datum int4pl(PG_FUNCTION_ARGS);
231 extern Datum int4mi(PG_FUNCTION_ARGS);
232 extern Datum int4mul(PG_FUNCTION_ARGS);
233 extern Datum int4div(PG_FUNCTION_ARGS);
234 extern Datum int4abs(PG_FUNCTION_ARGS);
235 extern Datum int4inc(PG_FUNCTION_ARGS);
236 extern Datum int2um(PG_FUNCTION_ARGS);
237 extern Datum int2up(PG_FUNCTION_ARGS);
238 extern Datum int2pl(PG_FUNCTION_ARGS);
239 extern Datum int2mi(PG_FUNCTION_ARGS);
240 extern Datum int2mul(PG_FUNCTION_ARGS);
241 extern Datum int2div(PG_FUNCTION_ARGS);
242 extern Datum int2abs(PG_FUNCTION_ARGS);
243 extern Datum int24pl(PG_FUNCTION_ARGS);
244 extern Datum int24mi(PG_FUNCTION_ARGS);
245 extern Datum int24mul(PG_FUNCTION_ARGS);
246 extern Datum int24div(PG_FUNCTION_ARGS);
247 extern Datum int42pl(PG_FUNCTION_ARGS);
248 extern Datum int42mi(PG_FUNCTION_ARGS);
249 extern Datum int42mul(PG_FUNCTION_ARGS);
250 extern Datum int42div(PG_FUNCTION_ARGS);
251 extern Datum int4mod(PG_FUNCTION_ARGS);
252 extern Datum int2mod(PG_FUNCTION_ARGS);
253 extern Datum int2larger(PG_FUNCTION_ARGS);
254 extern Datum int2smaller(PG_FUNCTION_ARGS);
255 extern Datum int4larger(PG_FUNCTION_ARGS);
256 extern Datum int4smaller(PG_FUNCTION_ARGS);
257 
258 extern Datum int4and(PG_FUNCTION_ARGS);
259 extern Datum int4or(PG_FUNCTION_ARGS);
260 extern Datum int4xor(PG_FUNCTION_ARGS);
261 extern Datum int4not(PG_FUNCTION_ARGS);
262 extern Datum int4shl(PG_FUNCTION_ARGS);
263 extern Datum int4shr(PG_FUNCTION_ARGS);
264 extern Datum int2and(PG_FUNCTION_ARGS);
265 extern Datum int2or(PG_FUNCTION_ARGS);
266 extern Datum int2xor(PG_FUNCTION_ARGS);
267 extern Datum int2not(PG_FUNCTION_ARGS);
268 extern Datum int2shl(PG_FUNCTION_ARGS);
269 extern Datum int2shr(PG_FUNCTION_ARGS);
270 extern Datum generate_series_int4(PG_FUNCTION_ARGS);
271 extern Datum generate_series_step_int4(PG_FUNCTION_ARGS);
272 extern int2vector *buildint2vector(const int16 *int2s, int n);
273 
274 /* name.c */
275 extern Datum namein(PG_FUNCTION_ARGS);
276 extern Datum nameout(PG_FUNCTION_ARGS);
277 extern Datum namerecv(PG_FUNCTION_ARGS);
278 extern Datum namesend(PG_FUNCTION_ARGS);
279 extern Datum nameeq(PG_FUNCTION_ARGS);
280 extern Datum namene(PG_FUNCTION_ARGS);
281 extern Datum namelt(PG_FUNCTION_ARGS);
282 extern Datum namele(PG_FUNCTION_ARGS);
283 extern Datum namegt(PG_FUNCTION_ARGS);
284 extern Datum namege(PG_FUNCTION_ARGS);
285 extern int	namecpy(Name n1, Name n2);
286 extern int	namestrcpy(Name name, const char *str);
287 extern int	namestrcmp(Name name, const char *str);
288 extern Datum current_user(PG_FUNCTION_ARGS);
289 extern Datum session_user(PG_FUNCTION_ARGS);
290 extern Datum current_schema(PG_FUNCTION_ARGS);
291 extern Datum current_schemas(PG_FUNCTION_ARGS);
292 
293 /* numutils.c */
294 extern int32 pg_atoi(const char *s, int size, int c);
295 extern void pg_itoa(int16 i, char *a);
296 extern void pg_ltoa(int32 l, char *a);
297 extern void pg_lltoa(int64 ll, char *a);
298 extern char *pg_ltostr_zeropad(char *str, int32 value, int32 minwidth);
299 extern char *pg_ltostr(char *str, int32 value);
300 extern uint64 pg_strtouint64(const char *str, char **endptr, int base);
301 
302 /*
303  *		Per-opclass comparison functions for new btrees.  These are
304  *		stored in pg_amproc; most are defined in access/nbtree/nbtcompare.c
305  */
306 extern Datum btboolcmp(PG_FUNCTION_ARGS);
307 extern Datum btint2cmp(PG_FUNCTION_ARGS);
308 extern Datum btint4cmp(PG_FUNCTION_ARGS);
309 extern Datum btint8cmp(PG_FUNCTION_ARGS);
310 extern Datum btfloat4cmp(PG_FUNCTION_ARGS);
311 extern Datum btfloat8cmp(PG_FUNCTION_ARGS);
312 extern Datum btint48cmp(PG_FUNCTION_ARGS);
313 extern Datum btint84cmp(PG_FUNCTION_ARGS);
314 extern Datum btint24cmp(PG_FUNCTION_ARGS);
315 extern Datum btint42cmp(PG_FUNCTION_ARGS);
316 extern Datum btint28cmp(PG_FUNCTION_ARGS);
317 extern Datum btint82cmp(PG_FUNCTION_ARGS);
318 extern Datum btfloat48cmp(PG_FUNCTION_ARGS);
319 extern Datum btfloat84cmp(PG_FUNCTION_ARGS);
320 extern Datum btoidcmp(PG_FUNCTION_ARGS);
321 extern Datum btoidvectorcmp(PG_FUNCTION_ARGS);
322 extern Datum btabstimecmp(PG_FUNCTION_ARGS);
323 extern Datum btreltimecmp(PG_FUNCTION_ARGS);
324 extern Datum bttintervalcmp(PG_FUNCTION_ARGS);
325 extern Datum btcharcmp(PG_FUNCTION_ARGS);
326 extern Datum btnamecmp(PG_FUNCTION_ARGS);
327 extern Datum bttextcmp(PG_FUNCTION_ARGS);
328 extern Datum bttextsortsupport(PG_FUNCTION_ARGS);
329 
330 /*
331  *		Per-opclass sort support functions for new btrees.  Like the
332  *		functions above, these are stored in pg_amproc; most are defined in
333  *		access/nbtree/nbtcompare.c
334  */
335 extern Datum btint2sortsupport(PG_FUNCTION_ARGS);
336 extern Datum btint4sortsupport(PG_FUNCTION_ARGS);
337 extern Datum btint8sortsupport(PG_FUNCTION_ARGS);
338 extern Datum btfloat4sortsupport(PG_FUNCTION_ARGS);
339 extern Datum btfloat8sortsupport(PG_FUNCTION_ARGS);
340 extern Datum btoidsortsupport(PG_FUNCTION_ARGS);
341 extern Datum btnamesortsupport(PG_FUNCTION_ARGS);
342 
343 /* float.c */
344 extern PGDLLIMPORT int extra_float_digits;
345 
346 extern double get_float8_infinity(void);
347 extern float get_float4_infinity(void);
348 extern double get_float8_nan(void);
349 extern float get_float4_nan(void);
350 extern int	is_infinite(double val);
351 extern double float8in_internal(char *num, char **endptr_p,
352 				  const char *type_name, const char *orig_string);
353 extern char *float8out_internal(double num);
354 extern int	float4_cmp_internal(float4 a, float4 b);
355 extern int	float8_cmp_internal(float8 a, float8 b);
356 
357 extern Datum float4in(PG_FUNCTION_ARGS);
358 extern Datum float4out(PG_FUNCTION_ARGS);
359 extern Datum float4recv(PG_FUNCTION_ARGS);
360 extern Datum float4send(PG_FUNCTION_ARGS);
361 extern Datum float8in(PG_FUNCTION_ARGS);
362 extern Datum float8out(PG_FUNCTION_ARGS);
363 extern Datum float8recv(PG_FUNCTION_ARGS);
364 extern Datum float8send(PG_FUNCTION_ARGS);
365 extern Datum float4abs(PG_FUNCTION_ARGS);
366 extern Datum float4um(PG_FUNCTION_ARGS);
367 extern Datum float4up(PG_FUNCTION_ARGS);
368 extern Datum float4larger(PG_FUNCTION_ARGS);
369 extern Datum float4smaller(PG_FUNCTION_ARGS);
370 extern Datum float8abs(PG_FUNCTION_ARGS);
371 extern Datum float8um(PG_FUNCTION_ARGS);
372 extern Datum float8up(PG_FUNCTION_ARGS);
373 extern Datum float8larger(PG_FUNCTION_ARGS);
374 extern Datum float8smaller(PG_FUNCTION_ARGS);
375 extern Datum float4pl(PG_FUNCTION_ARGS);
376 extern Datum float4mi(PG_FUNCTION_ARGS);
377 extern Datum float4mul(PG_FUNCTION_ARGS);
378 extern Datum float4div(PG_FUNCTION_ARGS);
379 extern Datum float8pl(PG_FUNCTION_ARGS);
380 extern Datum float8mi(PG_FUNCTION_ARGS);
381 extern Datum float8mul(PG_FUNCTION_ARGS);
382 extern Datum float8div(PG_FUNCTION_ARGS);
383 extern Datum float4eq(PG_FUNCTION_ARGS);
384 extern Datum float4ne(PG_FUNCTION_ARGS);
385 extern Datum float4lt(PG_FUNCTION_ARGS);
386 extern Datum float4le(PG_FUNCTION_ARGS);
387 extern Datum float4gt(PG_FUNCTION_ARGS);
388 extern Datum float4ge(PG_FUNCTION_ARGS);
389 extern Datum float8eq(PG_FUNCTION_ARGS);
390 extern Datum float8ne(PG_FUNCTION_ARGS);
391 extern Datum float8lt(PG_FUNCTION_ARGS);
392 extern Datum float8le(PG_FUNCTION_ARGS);
393 extern Datum float8gt(PG_FUNCTION_ARGS);
394 extern Datum float8ge(PG_FUNCTION_ARGS);
395 extern Datum ftod(PG_FUNCTION_ARGS);
396 extern Datum i4tod(PG_FUNCTION_ARGS);
397 extern Datum i2tod(PG_FUNCTION_ARGS);
398 extern Datum dtof(PG_FUNCTION_ARGS);
399 extern Datum dtoi4(PG_FUNCTION_ARGS);
400 extern Datum dtoi2(PG_FUNCTION_ARGS);
401 extern Datum i4tof(PG_FUNCTION_ARGS);
402 extern Datum i2tof(PG_FUNCTION_ARGS);
403 extern Datum ftoi4(PG_FUNCTION_ARGS);
404 extern Datum ftoi2(PG_FUNCTION_ARGS);
405 extern Datum dround(PG_FUNCTION_ARGS);
406 extern Datum dceil(PG_FUNCTION_ARGS);
407 extern Datum dfloor(PG_FUNCTION_ARGS);
408 extern Datum dsign(PG_FUNCTION_ARGS);
409 extern Datum dtrunc(PG_FUNCTION_ARGS);
410 extern Datum dsqrt(PG_FUNCTION_ARGS);
411 extern Datum dcbrt(PG_FUNCTION_ARGS);
412 extern Datum dpow(PG_FUNCTION_ARGS);
413 extern Datum dexp(PG_FUNCTION_ARGS);
414 extern Datum dlog1(PG_FUNCTION_ARGS);
415 extern Datum dlog10(PG_FUNCTION_ARGS);
416 extern Datum dacos(PG_FUNCTION_ARGS);
417 extern Datum dasin(PG_FUNCTION_ARGS);
418 extern Datum datan(PG_FUNCTION_ARGS);
419 extern Datum datan2(PG_FUNCTION_ARGS);
420 extern Datum dcos(PG_FUNCTION_ARGS);
421 extern Datum dcot(PG_FUNCTION_ARGS);
422 extern Datum dsin(PG_FUNCTION_ARGS);
423 extern Datum dtan(PG_FUNCTION_ARGS);
424 extern Datum dacosd(PG_FUNCTION_ARGS);
425 extern Datum dasind(PG_FUNCTION_ARGS);
426 extern Datum datand(PG_FUNCTION_ARGS);
427 extern Datum datan2d(PG_FUNCTION_ARGS);
428 extern Datum dcosd(PG_FUNCTION_ARGS);
429 extern Datum dcotd(PG_FUNCTION_ARGS);
430 extern Datum dsind(PG_FUNCTION_ARGS);
431 extern Datum dtand(PG_FUNCTION_ARGS);
432 extern Datum degrees(PG_FUNCTION_ARGS);
433 extern Datum dpi(PG_FUNCTION_ARGS);
434 extern Datum radians(PG_FUNCTION_ARGS);
435 extern Datum drandom(PG_FUNCTION_ARGS);
436 extern Datum setseed(PG_FUNCTION_ARGS);
437 extern Datum float8_combine(PG_FUNCTION_ARGS);
438 extern Datum float8_accum(PG_FUNCTION_ARGS);
439 extern Datum float4_accum(PG_FUNCTION_ARGS);
440 extern Datum float8_avg(PG_FUNCTION_ARGS);
441 extern Datum float8_var_pop(PG_FUNCTION_ARGS);
442 extern Datum float8_var_samp(PG_FUNCTION_ARGS);
443 extern Datum float8_stddev_pop(PG_FUNCTION_ARGS);
444 extern Datum float8_stddev_samp(PG_FUNCTION_ARGS);
445 extern Datum float8_regr_accum(PG_FUNCTION_ARGS);
446 extern Datum float8_regr_combine(PG_FUNCTION_ARGS);
447 extern Datum float8_regr_sxx(PG_FUNCTION_ARGS);
448 extern Datum float8_regr_syy(PG_FUNCTION_ARGS);
449 extern Datum float8_regr_sxy(PG_FUNCTION_ARGS);
450 extern Datum float8_regr_avgx(PG_FUNCTION_ARGS);
451 extern Datum float8_regr_avgy(PG_FUNCTION_ARGS);
452 extern Datum float8_covar_pop(PG_FUNCTION_ARGS);
453 extern Datum float8_covar_samp(PG_FUNCTION_ARGS);
454 extern Datum float8_corr(PG_FUNCTION_ARGS);
455 extern Datum float8_regr_r2(PG_FUNCTION_ARGS);
456 extern Datum float8_regr_slope(PG_FUNCTION_ARGS);
457 extern Datum float8_regr_intercept(PG_FUNCTION_ARGS);
458 extern Datum float48pl(PG_FUNCTION_ARGS);
459 extern Datum float48mi(PG_FUNCTION_ARGS);
460 extern Datum float48mul(PG_FUNCTION_ARGS);
461 extern Datum float48div(PG_FUNCTION_ARGS);
462 extern Datum float84pl(PG_FUNCTION_ARGS);
463 extern Datum float84mi(PG_FUNCTION_ARGS);
464 extern Datum float84mul(PG_FUNCTION_ARGS);
465 extern Datum float84div(PG_FUNCTION_ARGS);
466 extern Datum float48eq(PG_FUNCTION_ARGS);
467 extern Datum float48ne(PG_FUNCTION_ARGS);
468 extern Datum float48lt(PG_FUNCTION_ARGS);
469 extern Datum float48le(PG_FUNCTION_ARGS);
470 extern Datum float48gt(PG_FUNCTION_ARGS);
471 extern Datum float48ge(PG_FUNCTION_ARGS);
472 extern Datum float84eq(PG_FUNCTION_ARGS);
473 extern Datum float84ne(PG_FUNCTION_ARGS);
474 extern Datum float84lt(PG_FUNCTION_ARGS);
475 extern Datum float84le(PG_FUNCTION_ARGS);
476 extern Datum float84gt(PG_FUNCTION_ARGS);
477 extern Datum float84ge(PG_FUNCTION_ARGS);
478 extern Datum width_bucket_float8(PG_FUNCTION_ARGS);
479 
480 /* dbsize.c */
481 extern Datum pg_tablespace_size_oid(PG_FUNCTION_ARGS);
482 extern Datum pg_tablespace_size_name(PG_FUNCTION_ARGS);
483 extern Datum pg_database_size_oid(PG_FUNCTION_ARGS);
484 extern Datum pg_database_size_name(PG_FUNCTION_ARGS);
485 extern Datum pg_relation_size(PG_FUNCTION_ARGS);
486 extern Datum pg_total_relation_size(PG_FUNCTION_ARGS);
487 extern Datum pg_size_pretty(PG_FUNCTION_ARGS);
488 extern Datum pg_size_pretty_numeric(PG_FUNCTION_ARGS);
489 extern Datum pg_size_bytes(PG_FUNCTION_ARGS);
490 extern Datum pg_table_size(PG_FUNCTION_ARGS);
491 extern Datum pg_indexes_size(PG_FUNCTION_ARGS);
492 extern Datum pg_relation_filenode(PG_FUNCTION_ARGS);
493 extern Datum pg_filenode_relation(PG_FUNCTION_ARGS);
494 extern Datum pg_relation_filepath(PG_FUNCTION_ARGS);
495 
496 /* genfile.c */
497 extern Datum pg_stat_file(PG_FUNCTION_ARGS);
498 extern Datum pg_stat_file_1arg(PG_FUNCTION_ARGS);
499 extern Datum pg_read_file(PG_FUNCTION_ARGS);
500 extern Datum pg_read_file_off_len(PG_FUNCTION_ARGS);
501 extern Datum pg_read_file_all(PG_FUNCTION_ARGS);
502 extern Datum pg_read_binary_file(PG_FUNCTION_ARGS);
503 extern Datum pg_read_binary_file_off_len(PG_FUNCTION_ARGS);
504 extern Datum pg_read_binary_file_all(PG_FUNCTION_ARGS);
505 extern Datum pg_ls_dir(PG_FUNCTION_ARGS);
506 extern Datum pg_ls_dir_1arg(PG_FUNCTION_ARGS);
507 
508 /* misc.c */
509 extern Datum pg_num_nulls(PG_FUNCTION_ARGS);
510 extern Datum pg_num_nonnulls(PG_FUNCTION_ARGS);
511 extern Datum current_database(PG_FUNCTION_ARGS);
512 extern Datum current_query(PG_FUNCTION_ARGS);
513 extern Datum pg_cancel_backend(PG_FUNCTION_ARGS);
514 extern Datum pg_terminate_backend(PG_FUNCTION_ARGS);
515 extern Datum pg_reload_conf(PG_FUNCTION_ARGS);
516 extern Datum pg_tablespace_databases(PG_FUNCTION_ARGS);
517 extern Datum pg_tablespace_location(PG_FUNCTION_ARGS);
518 extern Datum pg_rotate_logfile(PG_FUNCTION_ARGS);
519 extern Datum pg_sleep(PG_FUNCTION_ARGS);
520 extern Datum pg_get_keywords(PG_FUNCTION_ARGS);
521 extern Datum pg_typeof(PG_FUNCTION_ARGS);
522 extern Datum pg_collation_for(PG_FUNCTION_ARGS);
523 extern Datum pg_relation_is_updatable(PG_FUNCTION_ARGS);
524 extern Datum pg_column_is_updatable(PG_FUNCTION_ARGS);
525 extern Datum parse_ident(PG_FUNCTION_ARGS);
526 
527 /* oid.c */
528 extern Datum oidin(PG_FUNCTION_ARGS);
529 extern Datum oidout(PG_FUNCTION_ARGS);
530 extern Datum oidrecv(PG_FUNCTION_ARGS);
531 extern Datum oidsend(PG_FUNCTION_ARGS);
532 extern Datum oideq(PG_FUNCTION_ARGS);
533 extern Datum oidne(PG_FUNCTION_ARGS);
534 extern Datum oidlt(PG_FUNCTION_ARGS);
535 extern Datum oidle(PG_FUNCTION_ARGS);
536 extern Datum oidge(PG_FUNCTION_ARGS);
537 extern Datum oidgt(PG_FUNCTION_ARGS);
538 extern Datum oidlarger(PG_FUNCTION_ARGS);
539 extern Datum oidsmaller(PG_FUNCTION_ARGS);
540 extern Datum oidvectorin(PG_FUNCTION_ARGS);
541 extern Datum oidvectorout(PG_FUNCTION_ARGS);
542 extern Datum oidvectorrecv(PG_FUNCTION_ARGS);
543 extern Datum oidvectorsend(PG_FUNCTION_ARGS);
544 extern Datum oidvectoreq(PG_FUNCTION_ARGS);
545 extern Datum oidvectorne(PG_FUNCTION_ARGS);
546 extern Datum oidvectorlt(PG_FUNCTION_ARGS);
547 extern Datum oidvectorle(PG_FUNCTION_ARGS);
548 extern Datum oidvectorge(PG_FUNCTION_ARGS);
549 extern Datum oidvectorgt(PG_FUNCTION_ARGS);
550 extern oidvector *buildoidvector(const Oid *oids, int n);
551 extern Oid	oidparse(Node *node);
552 
553 /* orderedsetaggs.c */
554 extern Datum ordered_set_transition(PG_FUNCTION_ARGS);
555 extern Datum ordered_set_transition_multi(PG_FUNCTION_ARGS);
556 extern Datum percentile_disc_final(PG_FUNCTION_ARGS);
557 extern Datum percentile_cont_float8_final(PG_FUNCTION_ARGS);
558 extern Datum percentile_cont_interval_final(PG_FUNCTION_ARGS);
559 extern Datum percentile_disc_multi_final(PG_FUNCTION_ARGS);
560 extern Datum percentile_cont_float8_multi_final(PG_FUNCTION_ARGS);
561 extern Datum percentile_cont_interval_multi_final(PG_FUNCTION_ARGS);
562 extern Datum mode_final(PG_FUNCTION_ARGS);
563 extern Datum hypothetical_rank_final(PG_FUNCTION_ARGS);
564 extern Datum hypothetical_percent_rank_final(PG_FUNCTION_ARGS);
565 extern Datum hypothetical_cume_dist_final(PG_FUNCTION_ARGS);
566 extern Datum hypothetical_dense_rank_final(PG_FUNCTION_ARGS);
567 
568 /* pseudotypes.c */
569 extern Datum cstring_in(PG_FUNCTION_ARGS);
570 extern Datum cstring_out(PG_FUNCTION_ARGS);
571 extern Datum cstring_recv(PG_FUNCTION_ARGS);
572 extern Datum cstring_send(PG_FUNCTION_ARGS);
573 extern Datum any_in(PG_FUNCTION_ARGS);
574 extern Datum any_out(PG_FUNCTION_ARGS);
575 extern Datum anyarray_in(PG_FUNCTION_ARGS);
576 extern Datum anyarray_out(PG_FUNCTION_ARGS);
577 extern Datum anyarray_recv(PG_FUNCTION_ARGS);
578 extern Datum anyarray_send(PG_FUNCTION_ARGS);
579 extern Datum anynonarray_in(PG_FUNCTION_ARGS);
580 extern Datum anynonarray_out(PG_FUNCTION_ARGS);
581 extern Datum anyenum_in(PG_FUNCTION_ARGS);
582 extern Datum anyenum_out(PG_FUNCTION_ARGS);
583 extern Datum anyrange_in(PG_FUNCTION_ARGS);
584 extern Datum anyrange_out(PG_FUNCTION_ARGS);
585 extern Datum void_in(PG_FUNCTION_ARGS);
586 extern Datum void_out(PG_FUNCTION_ARGS);
587 extern Datum void_recv(PG_FUNCTION_ARGS);
588 extern Datum void_send(PG_FUNCTION_ARGS);
589 extern Datum trigger_in(PG_FUNCTION_ARGS);
590 extern Datum trigger_out(PG_FUNCTION_ARGS);
591 extern Datum event_trigger_in(PG_FUNCTION_ARGS);
592 extern Datum event_trigger_out(PG_FUNCTION_ARGS);
593 extern Datum language_handler_in(PG_FUNCTION_ARGS);
594 extern Datum language_handler_out(PG_FUNCTION_ARGS);
595 extern Datum fdw_handler_in(PG_FUNCTION_ARGS);
596 extern Datum fdw_handler_out(PG_FUNCTION_ARGS);
597 extern Datum index_am_handler_in(PG_FUNCTION_ARGS);
598 extern Datum index_am_handler_out(PG_FUNCTION_ARGS);
599 extern Datum tsm_handler_in(PG_FUNCTION_ARGS);
600 extern Datum tsm_handler_out(PG_FUNCTION_ARGS);
601 extern Datum internal_in(PG_FUNCTION_ARGS);
602 extern Datum internal_out(PG_FUNCTION_ARGS);
603 extern Datum opaque_in(PG_FUNCTION_ARGS);
604 extern Datum opaque_out(PG_FUNCTION_ARGS);
605 extern Datum anyelement_in(PG_FUNCTION_ARGS);
606 extern Datum anyelement_out(PG_FUNCTION_ARGS);
607 extern Datum shell_in(PG_FUNCTION_ARGS);
608 extern Datum shell_out(PG_FUNCTION_ARGS);
609 extern Datum pg_node_tree_in(PG_FUNCTION_ARGS);
610 extern Datum pg_node_tree_out(PG_FUNCTION_ARGS);
611 extern Datum pg_node_tree_recv(PG_FUNCTION_ARGS);
612 extern Datum pg_node_tree_send(PG_FUNCTION_ARGS);
613 extern Datum pg_ddl_command_in(PG_FUNCTION_ARGS);
614 extern Datum pg_ddl_command_out(PG_FUNCTION_ARGS);
615 extern Datum pg_ddl_command_recv(PG_FUNCTION_ARGS);
616 extern Datum pg_ddl_command_send(PG_FUNCTION_ARGS);
617 
618 /* regexp.c */
619 extern Datum nameregexeq(PG_FUNCTION_ARGS);
620 extern Datum nameregexne(PG_FUNCTION_ARGS);
621 extern Datum textregexeq(PG_FUNCTION_ARGS);
622 extern Datum textregexne(PG_FUNCTION_ARGS);
623 extern Datum nameicregexeq(PG_FUNCTION_ARGS);
624 extern Datum nameicregexne(PG_FUNCTION_ARGS);
625 extern Datum texticregexeq(PG_FUNCTION_ARGS);
626 extern Datum texticregexne(PG_FUNCTION_ARGS);
627 extern Datum textregexsubstr(PG_FUNCTION_ARGS);
628 extern Datum textregexreplace_noopt(PG_FUNCTION_ARGS);
629 extern Datum textregexreplace(PG_FUNCTION_ARGS);
630 extern Datum similar_escape(PG_FUNCTION_ARGS);
631 extern Datum regexp_matches(PG_FUNCTION_ARGS);
632 extern Datum regexp_matches_no_flags(PG_FUNCTION_ARGS);
633 extern Datum regexp_split_to_table(PG_FUNCTION_ARGS);
634 extern Datum regexp_split_to_table_no_flags(PG_FUNCTION_ARGS);
635 extern Datum regexp_split_to_array(PG_FUNCTION_ARGS);
636 extern Datum regexp_split_to_array_no_flags(PG_FUNCTION_ARGS);
637 extern char *regexp_fixed_prefix(text *text_re, bool case_insensitive,
638 					Oid collation, bool *exact);
639 
640 /* regproc.c */
641 extern Datum regprocin(PG_FUNCTION_ARGS);
642 extern Datum regprocout(PG_FUNCTION_ARGS);
643 extern Datum to_regproc(PG_FUNCTION_ARGS);
644 extern Datum to_regprocedure(PG_FUNCTION_ARGS);
645 extern Datum regprocrecv(PG_FUNCTION_ARGS);
646 extern Datum regprocsend(PG_FUNCTION_ARGS);
647 extern Datum regprocedurein(PG_FUNCTION_ARGS);
648 extern Datum regprocedureout(PG_FUNCTION_ARGS);
649 extern Datum regprocedurerecv(PG_FUNCTION_ARGS);
650 extern Datum regproceduresend(PG_FUNCTION_ARGS);
651 extern Datum regoperin(PG_FUNCTION_ARGS);
652 extern Datum regoperout(PG_FUNCTION_ARGS);
653 extern Datum regoperrecv(PG_FUNCTION_ARGS);
654 extern Datum regopersend(PG_FUNCTION_ARGS);
655 extern Datum to_regoper(PG_FUNCTION_ARGS);
656 extern Datum to_regoperator(PG_FUNCTION_ARGS);
657 extern Datum regoperatorin(PG_FUNCTION_ARGS);
658 extern Datum regoperatorout(PG_FUNCTION_ARGS);
659 extern Datum regoperatorrecv(PG_FUNCTION_ARGS);
660 extern Datum regoperatorsend(PG_FUNCTION_ARGS);
661 extern Datum regclassin(PG_FUNCTION_ARGS);
662 extern Datum regclassout(PG_FUNCTION_ARGS);
663 extern Datum regclassrecv(PG_FUNCTION_ARGS);
664 extern Datum regclasssend(PG_FUNCTION_ARGS);
665 extern Datum to_regclass(PG_FUNCTION_ARGS);
666 extern Datum regtypein(PG_FUNCTION_ARGS);
667 extern Datum regtypeout(PG_FUNCTION_ARGS);
668 extern Datum regtyperecv(PG_FUNCTION_ARGS);
669 extern Datum regtypesend(PG_FUNCTION_ARGS);
670 extern Datum to_regtype(PG_FUNCTION_ARGS);
671 extern Datum regrolein(PG_FUNCTION_ARGS);
672 extern Datum regroleout(PG_FUNCTION_ARGS);
673 extern Datum regrolerecv(PG_FUNCTION_ARGS);
674 extern Datum regrolesend(PG_FUNCTION_ARGS);
675 extern Datum to_regrole(PG_FUNCTION_ARGS);
676 extern Datum regnamespacein(PG_FUNCTION_ARGS);
677 extern Datum regnamespaceout(PG_FUNCTION_ARGS);
678 extern Datum regnamespacerecv(PG_FUNCTION_ARGS);
679 extern Datum regnamespacesend(PG_FUNCTION_ARGS);
680 extern Datum to_regnamespace(PG_FUNCTION_ARGS);
681 extern Datum regconfigin(PG_FUNCTION_ARGS);
682 extern Datum regconfigout(PG_FUNCTION_ARGS);
683 extern Datum regconfigrecv(PG_FUNCTION_ARGS);
684 extern Datum regconfigsend(PG_FUNCTION_ARGS);
685 extern Datum regdictionaryin(PG_FUNCTION_ARGS);
686 extern Datum regdictionaryout(PG_FUNCTION_ARGS);
687 extern Datum regdictionaryrecv(PG_FUNCTION_ARGS);
688 extern Datum regdictionarysend(PG_FUNCTION_ARGS);
689 extern Datum text_regclass(PG_FUNCTION_ARGS);
690 extern List *stringToQualifiedNameList(const char *string);
691 extern char *format_procedure(Oid procedure_oid);
692 extern char *format_procedure_qualified(Oid procedure_oid);
693 extern void format_procedure_parts(Oid operator_oid, List **objnames,
694 					   List **objargs);
695 extern char *format_operator(Oid operator_oid);
696 extern char *format_operator_qualified(Oid operator_oid);
697 extern void format_operator_parts(Oid operator_oid, List **objnames,
698 					  List **objargs);
699 
700 /* rowtypes.c */
701 extern Datum record_in(PG_FUNCTION_ARGS);
702 extern Datum record_out(PG_FUNCTION_ARGS);
703 extern Datum record_recv(PG_FUNCTION_ARGS);
704 extern Datum record_send(PG_FUNCTION_ARGS);
705 extern Datum record_eq(PG_FUNCTION_ARGS);
706 extern Datum record_ne(PG_FUNCTION_ARGS);
707 extern Datum record_lt(PG_FUNCTION_ARGS);
708 extern Datum record_gt(PG_FUNCTION_ARGS);
709 extern Datum record_le(PG_FUNCTION_ARGS);
710 extern Datum record_ge(PG_FUNCTION_ARGS);
711 extern Datum btrecordcmp(PG_FUNCTION_ARGS);
712 extern Datum record_image_eq(PG_FUNCTION_ARGS);
713 extern Datum record_image_ne(PG_FUNCTION_ARGS);
714 extern Datum record_image_lt(PG_FUNCTION_ARGS);
715 extern Datum record_image_gt(PG_FUNCTION_ARGS);
716 extern Datum record_image_le(PG_FUNCTION_ARGS);
717 extern Datum record_image_ge(PG_FUNCTION_ARGS);
718 extern Datum btrecordimagecmp(PG_FUNCTION_ARGS);
719 
720 /* ruleutils.c */
721 extern bool quote_all_identifiers;
722 extern Datum pg_get_ruledef(PG_FUNCTION_ARGS);
723 extern Datum pg_get_ruledef_ext(PG_FUNCTION_ARGS);
724 extern Datum pg_get_viewdef(PG_FUNCTION_ARGS);
725 extern Datum pg_get_viewdef_ext(PG_FUNCTION_ARGS);
726 extern Datum pg_get_viewdef_wrap(PG_FUNCTION_ARGS);
727 extern Datum pg_get_viewdef_name(PG_FUNCTION_ARGS);
728 extern Datum pg_get_viewdef_name_ext(PG_FUNCTION_ARGS);
729 extern Datum pg_get_indexdef(PG_FUNCTION_ARGS);
730 extern Datum pg_get_indexdef_ext(PG_FUNCTION_ARGS);
731 extern Datum pg_get_triggerdef(PG_FUNCTION_ARGS);
732 extern Datum pg_get_triggerdef_ext(PG_FUNCTION_ARGS);
733 extern Datum pg_get_constraintdef(PG_FUNCTION_ARGS);
734 extern Datum pg_get_constraintdef_ext(PG_FUNCTION_ARGS);
735 extern Datum pg_get_expr(PG_FUNCTION_ARGS);
736 extern Datum pg_get_expr_ext(PG_FUNCTION_ARGS);
737 extern Datum pg_get_userbyid(PG_FUNCTION_ARGS);
738 extern Datum pg_get_serial_sequence(PG_FUNCTION_ARGS);
739 extern Datum pg_get_functiondef(PG_FUNCTION_ARGS);
740 extern Datum pg_get_function_arguments(PG_FUNCTION_ARGS);
741 extern Datum pg_get_function_identity_arguments(PG_FUNCTION_ARGS);
742 extern Datum pg_get_function_result(PG_FUNCTION_ARGS);
743 extern Datum pg_get_function_arg_default(PG_FUNCTION_ARGS);
744 extern const char *quote_identifier(const char *ident);
745 extern char *quote_qualified_identifier(const char *qualifier,
746 						   const char *ident);
747 extern void generate_operator_clause(fmStringInfo buf,
748 						 const char *leftop, Oid leftoptype,
749 						 Oid opoid,
750 						 const char *rightop, Oid rightoptype);
751 
752 
753 /* tid.c */
754 extern Datum tidin(PG_FUNCTION_ARGS);
755 extern Datum tidout(PG_FUNCTION_ARGS);
756 extern Datum tidrecv(PG_FUNCTION_ARGS);
757 extern Datum tidsend(PG_FUNCTION_ARGS);
758 extern Datum tideq(PG_FUNCTION_ARGS);
759 extern Datum tidne(PG_FUNCTION_ARGS);
760 extern Datum tidlt(PG_FUNCTION_ARGS);
761 extern Datum tidle(PG_FUNCTION_ARGS);
762 extern Datum tidgt(PG_FUNCTION_ARGS);
763 extern Datum tidge(PG_FUNCTION_ARGS);
764 extern Datum bttidcmp(PG_FUNCTION_ARGS);
765 extern Datum tidlarger(PG_FUNCTION_ARGS);
766 extern Datum tidsmaller(PG_FUNCTION_ARGS);
767 extern Datum currtid_byreloid(PG_FUNCTION_ARGS);
768 extern Datum currtid_byrelname(PG_FUNCTION_ARGS);
769 
770 /* varchar.c */
771 extern Datum bpcharin(PG_FUNCTION_ARGS);
772 extern Datum bpcharout(PG_FUNCTION_ARGS);
773 extern Datum bpcharrecv(PG_FUNCTION_ARGS);
774 extern Datum bpcharsend(PG_FUNCTION_ARGS);
775 extern Datum bpchartypmodin(PG_FUNCTION_ARGS);
776 extern Datum bpchartypmodout(PG_FUNCTION_ARGS);
777 extern Datum bpchar(PG_FUNCTION_ARGS);
778 extern Datum char_bpchar(PG_FUNCTION_ARGS);
779 extern Datum name_bpchar(PG_FUNCTION_ARGS);
780 extern Datum bpchar_name(PG_FUNCTION_ARGS);
781 extern Datum bpchareq(PG_FUNCTION_ARGS);
782 extern Datum bpcharne(PG_FUNCTION_ARGS);
783 extern Datum bpcharlt(PG_FUNCTION_ARGS);
784 extern Datum bpcharle(PG_FUNCTION_ARGS);
785 extern Datum bpchargt(PG_FUNCTION_ARGS);
786 extern Datum bpcharge(PG_FUNCTION_ARGS);
787 extern Datum bpcharcmp(PG_FUNCTION_ARGS);
788 extern Datum bpchar_sortsupport(PG_FUNCTION_ARGS);
789 extern Datum bpchar_larger(PG_FUNCTION_ARGS);
790 extern Datum bpchar_smaller(PG_FUNCTION_ARGS);
791 extern int	bpchartruelen(char *s, int len);
792 extern Datum bpcharlen(PG_FUNCTION_ARGS);
793 extern Datum bpcharoctetlen(PG_FUNCTION_ARGS);
794 extern Datum hashbpchar(PG_FUNCTION_ARGS);
795 extern Datum bpchar_pattern_lt(PG_FUNCTION_ARGS);
796 extern Datum bpchar_pattern_le(PG_FUNCTION_ARGS);
797 extern Datum bpchar_pattern_gt(PG_FUNCTION_ARGS);
798 extern Datum bpchar_pattern_ge(PG_FUNCTION_ARGS);
799 extern Datum btbpchar_pattern_cmp(PG_FUNCTION_ARGS);
800 extern Datum btbpchar_pattern_sortsupport(PG_FUNCTION_ARGS);
801 
802 extern Datum varcharin(PG_FUNCTION_ARGS);
803 extern Datum varcharout(PG_FUNCTION_ARGS);
804 extern Datum varcharrecv(PG_FUNCTION_ARGS);
805 extern Datum varcharsend(PG_FUNCTION_ARGS);
806 extern Datum varchartypmodin(PG_FUNCTION_ARGS);
807 extern Datum varchartypmodout(PG_FUNCTION_ARGS);
808 extern Datum varchar_transform(PG_FUNCTION_ARGS);
809 extern Datum varchar(PG_FUNCTION_ARGS);
810 
811 /* varlena.c */
812 extern text *cstring_to_text(const char *s);
813 extern text *cstring_to_text_with_len(const char *s, int len);
814 extern char *text_to_cstring(const text *t);
815 extern void text_to_cstring_buffer(const text *src, char *dst, size_t dst_len);
816 
817 #define CStringGetTextDatum(s) PointerGetDatum(cstring_to_text(s))
818 #define TextDatumGetCString(d) text_to_cstring((text *) DatumGetPointer(d))
819 
820 extern Datum textin(PG_FUNCTION_ARGS);
821 extern Datum textout(PG_FUNCTION_ARGS);
822 extern Datum textrecv(PG_FUNCTION_ARGS);
823 extern Datum textsend(PG_FUNCTION_ARGS);
824 extern Datum textcat(PG_FUNCTION_ARGS);
825 extern Datum texteq(PG_FUNCTION_ARGS);
826 extern Datum textne(PG_FUNCTION_ARGS);
827 extern Datum text_lt(PG_FUNCTION_ARGS);
828 extern Datum text_le(PG_FUNCTION_ARGS);
829 extern Datum text_gt(PG_FUNCTION_ARGS);
830 extern Datum text_ge(PG_FUNCTION_ARGS);
831 extern Datum text_larger(PG_FUNCTION_ARGS);
832 extern Datum text_smaller(PG_FUNCTION_ARGS);
833 extern Datum text_pattern_lt(PG_FUNCTION_ARGS);
834 extern Datum text_pattern_le(PG_FUNCTION_ARGS);
835 extern Datum text_pattern_gt(PG_FUNCTION_ARGS);
836 extern Datum text_pattern_ge(PG_FUNCTION_ARGS);
837 extern Datum bttext_pattern_cmp(PG_FUNCTION_ARGS);
838 extern Datum bttext_pattern_sortsupport(PG_FUNCTION_ARGS);
839 extern Datum textlen(PG_FUNCTION_ARGS);
840 extern Datum textoctetlen(PG_FUNCTION_ARGS);
841 extern Datum textpos(PG_FUNCTION_ARGS);
842 extern Datum text_substr(PG_FUNCTION_ARGS);
843 extern Datum text_substr_no_len(PG_FUNCTION_ARGS);
844 extern Datum textoverlay(PG_FUNCTION_ARGS);
845 extern Datum textoverlay_no_len(PG_FUNCTION_ARGS);
846 extern Datum name_text(PG_FUNCTION_ARGS);
847 extern Datum text_name(PG_FUNCTION_ARGS);
848 extern int	varstr_cmp(char *arg1, int len1, char *arg2, int len2, Oid collid);
849 extern void varstr_sortsupport(SortSupport ssup, Oid collid, bool bpchar);
850 extern int varstr_levenshtein(const char *source, int slen,
851 				   const char *target, int tlen,
852 				   int ins_c, int del_c, int sub_c,
853 				   bool trusted);
854 extern int varstr_levenshtein_less_equal(const char *source, int slen,
855 							  const char *target, int tlen,
856 							  int ins_c, int del_c, int sub_c,
857 							  int max_d, bool trusted);
858 extern List *textToQualifiedNameList(text *textval);
859 extern bool SplitIdentifierString(char *rawstring, char separator,
860 					  List **namelist);
861 extern bool SplitDirectoriesString(char *rawstring, char separator,
862 					   List **namelist);
863 extern bool SplitGUCList(char *rawstring, char separator,
864 			 List **namelist);
865 extern Datum replace_text(PG_FUNCTION_ARGS);
866 extern text *replace_text_regexp(text *src_text, void *regexp,
867 					text *replace_text, bool glob);
868 extern Datum split_text(PG_FUNCTION_ARGS);
869 extern Datum text_to_array(PG_FUNCTION_ARGS);
870 extern Datum array_to_text(PG_FUNCTION_ARGS);
871 extern Datum text_to_array_null(PG_FUNCTION_ARGS);
872 extern Datum array_to_text_null(PG_FUNCTION_ARGS);
873 extern Datum to_hex32(PG_FUNCTION_ARGS);
874 extern Datum to_hex64(PG_FUNCTION_ARGS);
875 extern Datum md5_text(PG_FUNCTION_ARGS);
876 extern Datum md5_bytea(PG_FUNCTION_ARGS);
877 
878 extern Datum unknownin(PG_FUNCTION_ARGS);
879 extern Datum unknownout(PG_FUNCTION_ARGS);
880 extern Datum unknownrecv(PG_FUNCTION_ARGS);
881 extern Datum unknownsend(PG_FUNCTION_ARGS);
882 
883 extern Datum pg_column_size(PG_FUNCTION_ARGS);
884 
885 extern Datum bytea_string_agg_transfn(PG_FUNCTION_ARGS);
886 extern Datum bytea_string_agg_finalfn(PG_FUNCTION_ARGS);
887 extern Datum string_agg_transfn(PG_FUNCTION_ARGS);
888 extern Datum string_agg_finalfn(PG_FUNCTION_ARGS);
889 
890 extern Datum text_concat(PG_FUNCTION_ARGS);
891 extern Datum text_concat_ws(PG_FUNCTION_ARGS);
892 extern Datum text_left(PG_FUNCTION_ARGS);
893 extern Datum text_right(PG_FUNCTION_ARGS);
894 extern Datum text_reverse(PG_FUNCTION_ARGS);
895 extern Datum text_format(PG_FUNCTION_ARGS);
896 extern Datum text_format_nv(PG_FUNCTION_ARGS);
897 
898 /* version.c */
899 extern Datum pgsql_version(PG_FUNCTION_ARGS);
900 
901 /* xid.c */
902 extern Datum xidin(PG_FUNCTION_ARGS);
903 extern Datum xidout(PG_FUNCTION_ARGS);
904 extern Datum xidrecv(PG_FUNCTION_ARGS);
905 extern Datum xidsend(PG_FUNCTION_ARGS);
906 extern Datum xideq(PG_FUNCTION_ARGS);
907 extern Datum xidneq(PG_FUNCTION_ARGS);
908 extern Datum xid_age(PG_FUNCTION_ARGS);
909 extern Datum mxid_age(PG_FUNCTION_ARGS);
910 extern int	xidComparator(const void *arg1, const void *arg2);
911 extern Datum cidin(PG_FUNCTION_ARGS);
912 extern Datum cidout(PG_FUNCTION_ARGS);
913 extern Datum cidrecv(PG_FUNCTION_ARGS);
914 extern Datum cidsend(PG_FUNCTION_ARGS);
915 extern Datum cideq(PG_FUNCTION_ARGS);
916 
917 /* like.c */
918 extern Datum namelike(PG_FUNCTION_ARGS);
919 extern Datum namenlike(PG_FUNCTION_ARGS);
920 extern Datum nameiclike(PG_FUNCTION_ARGS);
921 extern Datum nameicnlike(PG_FUNCTION_ARGS);
922 extern Datum textlike(PG_FUNCTION_ARGS);
923 extern Datum textnlike(PG_FUNCTION_ARGS);
924 extern Datum texticlike(PG_FUNCTION_ARGS);
925 extern Datum texticnlike(PG_FUNCTION_ARGS);
926 extern Datum bytealike(PG_FUNCTION_ARGS);
927 extern Datum byteanlike(PG_FUNCTION_ARGS);
928 extern Datum like_escape(PG_FUNCTION_ARGS);
929 extern Datum like_escape_bytea(PG_FUNCTION_ARGS);
930 
931 /* oracle_compat.c */
932 extern Datum lower(PG_FUNCTION_ARGS);
933 extern Datum upper(PG_FUNCTION_ARGS);
934 extern Datum initcap(PG_FUNCTION_ARGS);
935 extern Datum lpad(PG_FUNCTION_ARGS);
936 extern Datum rpad(PG_FUNCTION_ARGS);
937 extern Datum btrim(PG_FUNCTION_ARGS);
938 extern Datum btrim1(PG_FUNCTION_ARGS);
939 extern Datum byteatrim(PG_FUNCTION_ARGS);
940 extern Datum ltrim(PG_FUNCTION_ARGS);
941 extern Datum ltrim1(PG_FUNCTION_ARGS);
942 extern Datum rtrim(PG_FUNCTION_ARGS);
943 extern Datum rtrim1(PG_FUNCTION_ARGS);
944 extern Datum translate(PG_FUNCTION_ARGS);
945 extern Datum chr (PG_FUNCTION_ARGS);
946 extern Datum repeat(PG_FUNCTION_ARGS);
947 extern Datum ascii(PG_FUNCTION_ARGS);
948 
949 /* inet_cidr_ntop.c */
950 extern char *inet_cidr_ntop(int af, const void *src, int bits,
951 			   char *dst, size_t size);
952 
953 /* inet_net_pton.c */
954 extern int inet_net_pton(int af, const char *src,
955 			  void *dst, size_t size);
956 
957 /* network.c */
958 extern Datum inet_in(PG_FUNCTION_ARGS);
959 extern Datum inet_out(PG_FUNCTION_ARGS);
960 extern Datum inet_recv(PG_FUNCTION_ARGS);
961 extern Datum inet_send(PG_FUNCTION_ARGS);
962 extern Datum cidr_in(PG_FUNCTION_ARGS);
963 extern Datum cidr_out(PG_FUNCTION_ARGS);
964 extern Datum cidr_recv(PG_FUNCTION_ARGS);
965 extern Datum cidr_send(PG_FUNCTION_ARGS);
966 extern Datum network_cmp(PG_FUNCTION_ARGS);
967 extern Datum network_lt(PG_FUNCTION_ARGS);
968 extern Datum network_le(PG_FUNCTION_ARGS);
969 extern Datum network_eq(PG_FUNCTION_ARGS);
970 extern Datum network_ge(PG_FUNCTION_ARGS);
971 extern Datum network_gt(PG_FUNCTION_ARGS);
972 extern Datum network_ne(PG_FUNCTION_ARGS);
973 extern Datum network_smaller(PG_FUNCTION_ARGS);
974 extern Datum network_larger(PG_FUNCTION_ARGS);
975 extern Datum hashinet(PG_FUNCTION_ARGS);
976 extern Datum network_sub(PG_FUNCTION_ARGS);
977 extern Datum network_subeq(PG_FUNCTION_ARGS);
978 extern Datum network_sup(PG_FUNCTION_ARGS);
979 extern Datum network_supeq(PG_FUNCTION_ARGS);
980 extern Datum network_overlap(PG_FUNCTION_ARGS);
981 extern Datum network_network(PG_FUNCTION_ARGS);
982 extern Datum network_netmask(PG_FUNCTION_ARGS);
983 extern Datum network_hostmask(PG_FUNCTION_ARGS);
984 extern Datum network_masklen(PG_FUNCTION_ARGS);
985 extern Datum network_family(PG_FUNCTION_ARGS);
986 extern Datum network_broadcast(PG_FUNCTION_ARGS);
987 extern Datum network_host(PG_FUNCTION_ARGS);
988 extern Datum network_show(PG_FUNCTION_ARGS);
989 extern Datum inet_abbrev(PG_FUNCTION_ARGS);
990 extern Datum cidr_abbrev(PG_FUNCTION_ARGS);
991 extern double convert_network_to_scalar(Datum value, Oid typid, bool *failure);
992 extern Datum inet_to_cidr(PG_FUNCTION_ARGS);
993 extern Datum inet_set_masklen(PG_FUNCTION_ARGS);
994 extern Datum cidr_set_masklen(PG_FUNCTION_ARGS);
995 extern Datum network_scan_first(Datum in);
996 extern Datum network_scan_last(Datum in);
997 extern Datum inet_client_addr(PG_FUNCTION_ARGS);
998 extern Datum inet_client_port(PG_FUNCTION_ARGS);
999 extern Datum inet_server_addr(PG_FUNCTION_ARGS);
1000 extern Datum inet_server_port(PG_FUNCTION_ARGS);
1001 extern Datum inetnot(PG_FUNCTION_ARGS);
1002 extern Datum inetand(PG_FUNCTION_ARGS);
1003 extern Datum inetor(PG_FUNCTION_ARGS);
1004 extern Datum inetpl(PG_FUNCTION_ARGS);
1005 extern Datum inetmi_int8(PG_FUNCTION_ARGS);
1006 extern Datum inetmi(PG_FUNCTION_ARGS);
1007 extern void clean_ipv6_addr(int addr_family, char *addr);
1008 extern Datum inet_same_family(PG_FUNCTION_ARGS);
1009 extern Datum inet_merge(PG_FUNCTION_ARGS);
1010 
1011 /* mac.c */
1012 extern Datum macaddr_in(PG_FUNCTION_ARGS);
1013 extern Datum macaddr_out(PG_FUNCTION_ARGS);
1014 extern Datum macaddr_recv(PG_FUNCTION_ARGS);
1015 extern Datum macaddr_send(PG_FUNCTION_ARGS);
1016 extern Datum macaddr_cmp(PG_FUNCTION_ARGS);
1017 extern Datum macaddr_lt(PG_FUNCTION_ARGS);
1018 extern Datum macaddr_le(PG_FUNCTION_ARGS);
1019 extern Datum macaddr_eq(PG_FUNCTION_ARGS);
1020 extern Datum macaddr_ge(PG_FUNCTION_ARGS);
1021 extern Datum macaddr_gt(PG_FUNCTION_ARGS);
1022 extern Datum macaddr_ne(PG_FUNCTION_ARGS);
1023 extern Datum macaddr_not(PG_FUNCTION_ARGS);
1024 extern Datum macaddr_and(PG_FUNCTION_ARGS);
1025 extern Datum macaddr_or(PG_FUNCTION_ARGS);
1026 extern Datum macaddr_trunc(PG_FUNCTION_ARGS);
1027 extern Datum hashmacaddr(PG_FUNCTION_ARGS);
1028 
1029 /* numeric.c */
1030 extern Datum numeric_in(PG_FUNCTION_ARGS);
1031 extern Datum numeric_out(PG_FUNCTION_ARGS);
1032 extern Datum numeric_recv(PG_FUNCTION_ARGS);
1033 extern Datum numeric_send(PG_FUNCTION_ARGS);
1034 extern Datum numerictypmodin(PG_FUNCTION_ARGS);
1035 extern Datum numerictypmodout(PG_FUNCTION_ARGS);
1036 extern Datum numeric_transform(PG_FUNCTION_ARGS);
1037 extern Datum numeric (PG_FUNCTION_ARGS);
1038 extern Datum numeric_abs(PG_FUNCTION_ARGS);
1039 extern Datum numeric_uminus(PG_FUNCTION_ARGS);
1040 extern Datum numeric_uplus(PG_FUNCTION_ARGS);
1041 extern Datum numeric_sign(PG_FUNCTION_ARGS);
1042 extern Datum numeric_round(PG_FUNCTION_ARGS);
1043 extern Datum numeric_trunc(PG_FUNCTION_ARGS);
1044 extern Datum numeric_ceil(PG_FUNCTION_ARGS);
1045 extern Datum numeric_floor(PG_FUNCTION_ARGS);
1046 extern Datum numeric_sortsupport(PG_FUNCTION_ARGS);
1047 extern Datum numeric_cmp(PG_FUNCTION_ARGS);
1048 extern Datum numeric_eq(PG_FUNCTION_ARGS);
1049 extern Datum numeric_ne(PG_FUNCTION_ARGS);
1050 extern Datum numeric_gt(PG_FUNCTION_ARGS);
1051 extern Datum numeric_ge(PG_FUNCTION_ARGS);
1052 extern Datum numeric_lt(PG_FUNCTION_ARGS);
1053 extern Datum numeric_le(PG_FUNCTION_ARGS);
1054 extern Datum numeric_add(PG_FUNCTION_ARGS);
1055 extern Datum numeric_sub(PG_FUNCTION_ARGS);
1056 extern Datum numeric_mul(PG_FUNCTION_ARGS);
1057 extern Datum numeric_div(PG_FUNCTION_ARGS);
1058 extern Datum numeric_div_trunc(PG_FUNCTION_ARGS);
1059 extern Datum numeric_mod(PG_FUNCTION_ARGS);
1060 extern Datum numeric_inc(PG_FUNCTION_ARGS);
1061 extern Datum numeric_smaller(PG_FUNCTION_ARGS);
1062 extern Datum numeric_larger(PG_FUNCTION_ARGS);
1063 extern Datum numeric_fac(PG_FUNCTION_ARGS);
1064 extern Datum numeric_sqrt(PG_FUNCTION_ARGS);
1065 extern Datum numeric_exp(PG_FUNCTION_ARGS);
1066 extern Datum numeric_ln(PG_FUNCTION_ARGS);
1067 extern Datum numeric_log(PG_FUNCTION_ARGS);
1068 extern Datum numeric_power(PG_FUNCTION_ARGS);
1069 extern Datum numeric_scale(PG_FUNCTION_ARGS);
1070 extern Datum int4_numeric(PG_FUNCTION_ARGS);
1071 extern Datum numeric_int4(PG_FUNCTION_ARGS);
1072 extern Datum int8_numeric(PG_FUNCTION_ARGS);
1073 extern Datum numeric_int8(PG_FUNCTION_ARGS);
1074 extern Datum int2_numeric(PG_FUNCTION_ARGS);
1075 extern Datum numeric_int2(PG_FUNCTION_ARGS);
1076 extern Datum float8_numeric(PG_FUNCTION_ARGS);
1077 extern Datum numeric_float8(PG_FUNCTION_ARGS);
1078 extern Datum numeric_float8_no_overflow(PG_FUNCTION_ARGS);
1079 extern Datum float4_numeric(PG_FUNCTION_ARGS);
1080 extern Datum numeric_float4(PG_FUNCTION_ARGS);
1081 extern Datum numeric_accum(PG_FUNCTION_ARGS);
1082 extern Datum numeric_combine(PG_FUNCTION_ARGS);
1083 extern Datum numeric_avg_accum(PG_FUNCTION_ARGS);
1084 extern Datum numeric_avg_combine(PG_FUNCTION_ARGS);
1085 extern Datum numeric_avg_serialize(PG_FUNCTION_ARGS);
1086 extern Datum numeric_avg_deserialize(PG_FUNCTION_ARGS);
1087 extern Datum numeric_serialize(PG_FUNCTION_ARGS);
1088 extern Datum numeric_deserialize(PG_FUNCTION_ARGS);
1089 extern Datum numeric_accum_inv(PG_FUNCTION_ARGS);
1090 extern Datum int2_accum(PG_FUNCTION_ARGS);
1091 extern Datum int4_accum(PG_FUNCTION_ARGS);
1092 extern Datum int8_accum(PG_FUNCTION_ARGS);
1093 extern Datum numeric_poly_combine(PG_FUNCTION_ARGS);
1094 extern Datum numeric_poly_serialize(PG_FUNCTION_ARGS);
1095 extern Datum numeric_poly_deserialize(PG_FUNCTION_ARGS);
1096 extern Datum int2_accum_inv(PG_FUNCTION_ARGS);
1097 extern Datum int4_accum_inv(PG_FUNCTION_ARGS);
1098 extern Datum int8_accum_inv(PG_FUNCTION_ARGS);
1099 extern Datum int8_avg_accum(PG_FUNCTION_ARGS);
1100 extern Datum int8_avg_combine(PG_FUNCTION_ARGS);
1101 extern Datum int8_avg_serialize(PG_FUNCTION_ARGS);
1102 extern Datum int8_avg_deserialize(PG_FUNCTION_ARGS);
1103 extern Datum numeric_avg(PG_FUNCTION_ARGS);
1104 extern Datum numeric_sum(PG_FUNCTION_ARGS);
1105 extern Datum numeric_var_pop(PG_FUNCTION_ARGS);
1106 extern Datum numeric_var_samp(PG_FUNCTION_ARGS);
1107 extern Datum numeric_stddev_pop(PG_FUNCTION_ARGS);
1108 extern Datum numeric_stddev_samp(PG_FUNCTION_ARGS);
1109 extern Datum numeric_poly_sum(PG_FUNCTION_ARGS);
1110 extern Datum numeric_poly_avg(PG_FUNCTION_ARGS);
1111 extern Datum numeric_poly_var_pop(PG_FUNCTION_ARGS);
1112 extern Datum numeric_poly_var_samp(PG_FUNCTION_ARGS);
1113 extern Datum numeric_poly_stddev_pop(PG_FUNCTION_ARGS);
1114 extern Datum numeric_poly_stddev_samp(PG_FUNCTION_ARGS);
1115 extern Datum int2_sum(PG_FUNCTION_ARGS);
1116 extern Datum int4_sum(PG_FUNCTION_ARGS);
1117 extern Datum int8_sum(PG_FUNCTION_ARGS);
1118 extern Datum int2_avg_accum(PG_FUNCTION_ARGS);
1119 extern Datum int4_avg_accum(PG_FUNCTION_ARGS);
1120 extern Datum int4_avg_combine(PG_FUNCTION_ARGS);
1121 extern Datum int2_avg_accum_inv(PG_FUNCTION_ARGS);
1122 extern Datum int4_avg_accum_inv(PG_FUNCTION_ARGS);
1123 extern Datum int8_avg_accum_inv(PG_FUNCTION_ARGS);
1124 extern Datum int8_avg(PG_FUNCTION_ARGS);
1125 extern Datum int2int4_sum(PG_FUNCTION_ARGS);
1126 extern Datum width_bucket_numeric(PG_FUNCTION_ARGS);
1127 extern Datum hash_numeric(PG_FUNCTION_ARGS);
1128 extern Datum generate_series_numeric(PG_FUNCTION_ARGS);
1129 extern Datum generate_series_step_numeric(PG_FUNCTION_ARGS);
1130 
1131 /* ri_triggers.c */
1132 extern Datum RI_FKey_check_ins(PG_FUNCTION_ARGS);
1133 extern Datum RI_FKey_check_upd(PG_FUNCTION_ARGS);
1134 extern Datum RI_FKey_noaction_del(PG_FUNCTION_ARGS);
1135 extern Datum RI_FKey_noaction_upd(PG_FUNCTION_ARGS);
1136 extern Datum RI_FKey_cascade_del(PG_FUNCTION_ARGS);
1137 extern Datum RI_FKey_cascade_upd(PG_FUNCTION_ARGS);
1138 extern Datum RI_FKey_restrict_del(PG_FUNCTION_ARGS);
1139 extern Datum RI_FKey_restrict_upd(PG_FUNCTION_ARGS);
1140 extern Datum RI_FKey_setnull_del(PG_FUNCTION_ARGS);
1141 extern Datum RI_FKey_setnull_upd(PG_FUNCTION_ARGS);
1142 extern Datum RI_FKey_setdefault_del(PG_FUNCTION_ARGS);
1143 extern Datum RI_FKey_setdefault_upd(PG_FUNCTION_ARGS);
1144 
1145 /* trigfuncs.c */
1146 extern Datum suppress_redundant_updates_trigger(PG_FUNCTION_ARGS);
1147 
1148 /* encoding support functions */
1149 extern Datum getdatabaseencoding(PG_FUNCTION_ARGS);
1150 extern Datum database_character_set(PG_FUNCTION_ARGS);
1151 extern Datum pg_client_encoding(PG_FUNCTION_ARGS);
1152 extern Datum PG_encoding_to_char(PG_FUNCTION_ARGS);
1153 extern Datum PG_char_to_encoding(PG_FUNCTION_ARGS);
1154 extern Datum PG_character_set_name(PG_FUNCTION_ARGS);
1155 extern Datum PG_character_set_id(PG_FUNCTION_ARGS);
1156 extern Datum pg_convert(PG_FUNCTION_ARGS);
1157 extern Datum pg_convert_to(PG_FUNCTION_ARGS);
1158 extern Datum pg_convert_from(PG_FUNCTION_ARGS);
1159 extern Datum length_in_encoding(PG_FUNCTION_ARGS);
1160 extern Datum pg_encoding_max_length_sql(PG_FUNCTION_ARGS);
1161 
1162 /* format_type.c */
1163 extern Datum format_type(PG_FUNCTION_ARGS);
1164 extern char *format_type_be(Oid type_oid);
1165 extern char *format_type_be_qualified(Oid type_oid);
1166 extern char *format_type_with_typemod(Oid type_oid, int32 typemod);
1167 extern char *format_type_with_typemod_qualified(Oid type_oid, int32 typemod);
1168 extern Datum oidvectortypes(PG_FUNCTION_ARGS);
1169 extern int32 type_maximum_size(Oid type_oid, int32 typemod);
1170 
1171 /* quote.c */
1172 extern Datum quote_ident(PG_FUNCTION_ARGS);
1173 extern Datum quote_literal(PG_FUNCTION_ARGS);
1174 extern char *quote_literal_cstr(const char *rawstr);
1175 extern Datum quote_nullable(PG_FUNCTION_ARGS);
1176 
1177 /* guc.c */
1178 extern Datum show_config_by_name(PG_FUNCTION_ARGS);
1179 extern Datum show_config_by_name_missing_ok(PG_FUNCTION_ARGS);
1180 extern Datum set_config_by_name(PG_FUNCTION_ARGS);
1181 extern Datum show_all_settings(PG_FUNCTION_ARGS);
1182 extern Datum show_all_file_settings(PG_FUNCTION_ARGS);
1183 
1184 /* pg_config.c */
1185 extern Datum pg_config(PG_FUNCTION_ARGS);
1186 
1187 /* pg_controldata.c */
1188 extern Datum pg_control_checkpoint(PG_FUNCTION_ARGS);
1189 extern Datum pg_control_system(PG_FUNCTION_ARGS);
1190 extern Datum pg_control_init(PG_FUNCTION_ARGS);
1191 extern Datum pg_control_recovery(PG_FUNCTION_ARGS);
1192 
1193 /* rls.c */
1194 extern Datum row_security_active(PG_FUNCTION_ARGS);
1195 extern Datum row_security_active_name(PG_FUNCTION_ARGS);
1196 
1197 /* lockfuncs.c */
1198 extern Datum pg_lock_status(PG_FUNCTION_ARGS);
1199 extern Datum pg_blocking_pids(PG_FUNCTION_ARGS);
1200 extern Datum pg_advisory_lock_int8(PG_FUNCTION_ARGS);
1201 extern Datum pg_advisory_xact_lock_int8(PG_FUNCTION_ARGS);
1202 extern Datum pg_advisory_lock_shared_int8(PG_FUNCTION_ARGS);
1203 extern Datum pg_advisory_xact_lock_shared_int8(PG_FUNCTION_ARGS);
1204 extern Datum pg_try_advisory_lock_int8(PG_FUNCTION_ARGS);
1205 extern Datum pg_try_advisory_xact_lock_int8(PG_FUNCTION_ARGS);
1206 extern Datum pg_try_advisory_lock_shared_int8(PG_FUNCTION_ARGS);
1207 extern Datum pg_try_advisory_xact_lock_shared_int8(PG_FUNCTION_ARGS);
1208 extern Datum pg_advisory_unlock_int8(PG_FUNCTION_ARGS);
1209 extern Datum pg_advisory_unlock_shared_int8(PG_FUNCTION_ARGS);
1210 extern Datum pg_advisory_lock_int4(PG_FUNCTION_ARGS);
1211 extern Datum pg_advisory_xact_lock_int4(PG_FUNCTION_ARGS);
1212 extern Datum pg_advisory_lock_shared_int4(PG_FUNCTION_ARGS);
1213 extern Datum pg_advisory_xact_lock_shared_int4(PG_FUNCTION_ARGS);
1214 extern Datum pg_try_advisory_lock_int4(PG_FUNCTION_ARGS);
1215 extern Datum pg_try_advisory_xact_lock_int4(PG_FUNCTION_ARGS);
1216 extern Datum pg_try_advisory_lock_shared_int4(PG_FUNCTION_ARGS);
1217 extern Datum pg_try_advisory_xact_lock_shared_int4(PG_FUNCTION_ARGS);
1218 extern Datum pg_advisory_unlock_int4(PG_FUNCTION_ARGS);
1219 extern Datum pg_advisory_unlock_shared_int4(PG_FUNCTION_ARGS);
1220 extern Datum pg_advisory_unlock_all(PG_FUNCTION_ARGS);
1221 
1222 /* txid.c */
1223 extern Datum txid_snapshot_in(PG_FUNCTION_ARGS);
1224 extern Datum txid_snapshot_out(PG_FUNCTION_ARGS);
1225 extern Datum txid_snapshot_recv(PG_FUNCTION_ARGS);
1226 extern Datum txid_snapshot_send(PG_FUNCTION_ARGS);
1227 extern Datum txid_current(PG_FUNCTION_ARGS);
1228 extern Datum txid_current_snapshot(PG_FUNCTION_ARGS);
1229 extern Datum txid_snapshot_xmin(PG_FUNCTION_ARGS);
1230 extern Datum txid_snapshot_xmax(PG_FUNCTION_ARGS);
1231 extern Datum txid_snapshot_xip(PG_FUNCTION_ARGS);
1232 extern Datum txid_visible_in_snapshot(PG_FUNCTION_ARGS);
1233 
1234 /* uuid.c */
1235 extern Datum uuid_in(PG_FUNCTION_ARGS);
1236 extern Datum uuid_out(PG_FUNCTION_ARGS);
1237 extern Datum uuid_send(PG_FUNCTION_ARGS);
1238 extern Datum uuid_recv(PG_FUNCTION_ARGS);
1239 extern Datum uuid_lt(PG_FUNCTION_ARGS);
1240 extern Datum uuid_le(PG_FUNCTION_ARGS);
1241 extern Datum uuid_eq(PG_FUNCTION_ARGS);
1242 extern Datum uuid_ge(PG_FUNCTION_ARGS);
1243 extern Datum uuid_gt(PG_FUNCTION_ARGS);
1244 extern Datum uuid_ne(PG_FUNCTION_ARGS);
1245 extern Datum uuid_cmp(PG_FUNCTION_ARGS);
1246 extern Datum uuid_sortsupport(PG_FUNCTION_ARGS);
1247 extern Datum uuid_hash(PG_FUNCTION_ARGS);
1248 
1249 /* windowfuncs.c */
1250 extern Datum window_row_number(PG_FUNCTION_ARGS);
1251 extern Datum window_rank(PG_FUNCTION_ARGS);
1252 extern Datum window_dense_rank(PG_FUNCTION_ARGS);
1253 extern Datum window_percent_rank(PG_FUNCTION_ARGS);
1254 extern Datum window_cume_dist(PG_FUNCTION_ARGS);
1255 extern Datum window_ntile(PG_FUNCTION_ARGS);
1256 extern Datum window_lag(PG_FUNCTION_ARGS);
1257 extern Datum window_lag_with_offset(PG_FUNCTION_ARGS);
1258 extern Datum window_lag_with_offset_and_default(PG_FUNCTION_ARGS);
1259 extern Datum window_lead(PG_FUNCTION_ARGS);
1260 extern Datum window_lead_with_offset(PG_FUNCTION_ARGS);
1261 extern Datum window_lead_with_offset_and_default(PG_FUNCTION_ARGS);
1262 extern Datum window_first_value(PG_FUNCTION_ARGS);
1263 extern Datum window_last_value(PG_FUNCTION_ARGS);
1264 extern Datum window_nth_value(PG_FUNCTION_ARGS);
1265 
1266 /* access/spgist/spgquadtreeproc.c */
1267 extern Datum spg_quad_config(PG_FUNCTION_ARGS);
1268 extern Datum spg_quad_choose(PG_FUNCTION_ARGS);
1269 extern Datum spg_quad_picksplit(PG_FUNCTION_ARGS);
1270 extern Datum spg_quad_inner_consistent(PG_FUNCTION_ARGS);
1271 extern Datum spg_quad_leaf_consistent(PG_FUNCTION_ARGS);
1272 
1273 /* access/spgist/spgkdtreeproc.c */
1274 extern Datum spg_kd_config(PG_FUNCTION_ARGS);
1275 extern Datum spg_kd_choose(PG_FUNCTION_ARGS);
1276 extern Datum spg_kd_picksplit(PG_FUNCTION_ARGS);
1277 extern Datum spg_kd_inner_consistent(PG_FUNCTION_ARGS);
1278 
1279 /* access/spgist/spgtextproc.c */
1280 extern Datum spg_text_config(PG_FUNCTION_ARGS);
1281 extern Datum spg_text_choose(PG_FUNCTION_ARGS);
1282 extern Datum spg_text_picksplit(PG_FUNCTION_ARGS);
1283 extern Datum spg_text_inner_consistent(PG_FUNCTION_ARGS);
1284 extern Datum spg_text_leaf_consistent(PG_FUNCTION_ARGS);
1285 
1286 /* access/gin/ginarrayproc.c */
1287 extern Datum ginarrayextract(PG_FUNCTION_ARGS);
1288 extern Datum ginarrayextract_2args(PG_FUNCTION_ARGS);
1289 extern Datum ginqueryarrayextract(PG_FUNCTION_ARGS);
1290 extern Datum ginarrayconsistent(PG_FUNCTION_ARGS);
1291 extern Datum ginarraytriconsistent(PG_FUNCTION_ARGS);
1292 
1293 /* access/tablesample/bernoulli.c */
1294 extern Datum tsm_bernoulli_handler(PG_FUNCTION_ARGS);
1295 
1296 /* access/tablesample/system.c */
1297 extern Datum tsm_system_handler(PG_FUNCTION_ARGS);
1298 
1299 /* access/transam/twophase.c */
1300 extern Datum pg_prepared_xact(PG_FUNCTION_ARGS);
1301 
1302 /* access/transam/multixact.c */
1303 extern Datum pg_get_multixact_members(PG_FUNCTION_ARGS);
1304 
1305 /* access/transam/committs.c */
1306 extern Datum pg_xact_commit_timestamp(PG_FUNCTION_ARGS);
1307 extern Datum pg_last_committed_xact(PG_FUNCTION_ARGS);
1308 
1309 /* catalogs/dependency.c */
1310 extern Datum pg_describe_object(PG_FUNCTION_ARGS);
1311 extern Datum pg_identify_object(PG_FUNCTION_ARGS);
1312 extern Datum pg_identify_object_as_address(PG_FUNCTION_ARGS);
1313 
1314 /* catalog/objectaddress.c */
1315 extern Datum pg_get_object_address(PG_FUNCTION_ARGS);
1316 
1317 /* commands/constraint.c */
1318 extern Datum unique_key_recheck(PG_FUNCTION_ARGS);
1319 
1320 /* commands/event_trigger.c */
1321 extern Datum pg_event_trigger_dropped_objects(PG_FUNCTION_ARGS);
1322 extern Datum pg_event_trigger_table_rewrite_oid(PG_FUNCTION_ARGS);
1323 extern Datum pg_event_trigger_table_rewrite_reason(PG_FUNCTION_ARGS);
1324 extern Datum pg_event_trigger_ddl_commands(PG_FUNCTION_ARGS);
1325 
1326 /* commands/extension.c */
1327 extern Datum pg_available_extensions(PG_FUNCTION_ARGS);
1328 extern Datum pg_available_extension_versions(PG_FUNCTION_ARGS);
1329 extern Datum pg_extension_update_paths(PG_FUNCTION_ARGS);
1330 extern Datum pg_extension_config_dump(PG_FUNCTION_ARGS);
1331 
1332 /* commands/prepare.c */
1333 extern Datum pg_prepared_statement(PG_FUNCTION_ARGS);
1334 
1335 /* utils/mmgr/portalmem.c */
1336 extern Datum pg_cursor(PG_FUNCTION_ARGS);
1337 
1338 #endif   /* BUILTINS_H */
1339