forked from orafce/orafce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
builtins.h
276 lines (248 loc) · 13.4 KB
/
builtins.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
#ifndef ORAFCE_BUILTINS
#define ORAFCE_BUILTINS
#ifndef PGDLLEXPORT
#ifdef _MSC_VER
#define PGDLLEXPORT __declspec(dllexport)
/*
* PG_MODULE_MAGIC and PG_FUNCTION_INFO_V1 macros are broken for MSVC.
* So, we redefine them.
*/
#undef PG_MODULE_MAGIC
#define PG_MODULE_MAGIC \
extern PGDLLEXPORT const Pg_magic_struct *PG_MAGIC_FUNCTION_NAME(void); \
const Pg_magic_struct * \
PG_MAGIC_FUNCTION_NAME(void) \
{ \
static const Pg_magic_struct Pg_magic_data = PG_MODULE_MAGIC_DATA; \
return &Pg_magic_data; \
} \
extern int no_such_variable
#undef PG_FUNCTION_INFO_V1
#define PG_FUNCTION_INFO_V1(funcname) \
extern PGDLLEXPORT const Pg_finfo_record * CppConcat(pg_finfo_,funcname)(void); \
const Pg_finfo_record * \
CppConcat(pg_finfo_,funcname) (void) \
{ \
static const Pg_finfo_record my_finfo = { 1 }; \
return &my_finfo; \
} \
extern int no_such_variable
#else
#define PGDLLEXPORT PGDLLIMPORT
#endif
#endif
extern char *nls_date_format;
/* from aggregate.c */
extern PGDLLEXPORT Datum orafce_listagg1_transfn(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum orafce_listagg2_transfn(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum orafce_listagg_finalfn(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum orafce_median4_transfn(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum orafce_median4_finalfn(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum orafce_median8_transfn(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum orafce_median8_finalfn(PG_FUNCTION_ARGS);
/* from alert.c */
extern PGDLLEXPORT Datum dbms_alert_register(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_alert_remove(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_alert_removeall(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_alert_set_defaults(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_alert_signal(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_alert_waitany(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_alert_waitone(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_alert_defered_signal(PG_FUNCTION_ARGS);
/* from assert.c */
extern PGDLLEXPORT Datum dbms_assert_enquote_literal(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_assert_enquote_name(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_assert_noop(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_assert_qualified_sql_name(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_assert_schema_name(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_assert_simple_sql_name(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_assert_object_name(PG_FUNCTION_ARGS);
/* from convert.c */
extern PGDLLEXPORT Datum orafce_to_char_int4(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum orafce_to_char_int8(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum orafce_to_char_float4(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum orafce_to_char_float8(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum orafce_to_char_numeric(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum orafce_to_char_timestamp(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum orafce_to_number(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum orafce_to_multi_byte(PG_FUNCTION_ARGS);
/* from datefce.c */
extern PGDLLEXPORT Datum next_day(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum next_day_by_index(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum last_day(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum months_between(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum add_months(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum ora_to_date(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum ora_date_trunc(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum ora_date_round(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum ora_timestamptz_trunc(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum ora_timestamptz_round(PG_FUNCTION_ARGS);
/* from file.c */
extern PGDLLEXPORT Datum utl_file_fopen(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum utl_file_is_open(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum utl_file_get_line(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum utl_file_get_nextline(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum utl_file_put(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum utl_file_put_line(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum utl_file_new_line(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum utl_file_putf(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum utl_file_fflush(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum utl_file_fclose(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum utl_file_fclose_all(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum utl_file_fremove(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum utl_file_frename(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum utl_file_fcopy(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum utl_file_fgetattr(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum utl_file_tmpdir(PG_FUNCTION_ARGS);
/* from others.c */
extern PGDLLEXPORT Datum ora_nvl(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum ora_nvl2(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum ora_concat(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum ora_nlssort(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum ora_set_nls_sort(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum ora_lnnvl(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum ora_decode(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum orafce_dump(PG_FUNCTION_ARGS);
/* from pipe.c */
extern PGDLLEXPORT Datum dbms_pipe_pack_message_text(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_pipe_unpack_message_text(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_pipe_send_message(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_pipe_receive_message(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_pipe_unique_session_name(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_pipe_list_pipes(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_pipe_next_item_type(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_pipe_create_pipe(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_pipe_create_pipe_2(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_pipe_create_pipe_1(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_pipe_reset_buffer(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_pipe_purge(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_pipe_remove_pipe(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_pipe_pack_message_date(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_pipe_unpack_message_date(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_pipe_pack_message_timestamp(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_pipe_unpack_message_timestamp(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_pipe_pack_message_number(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_pipe_unpack_message_number(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_pipe_pack_message_bytea(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_pipe_unpack_message_bytea(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_pipe_pack_message_record(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_pipe_unpack_message_record(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_pipe_pack_message_integer(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_pipe_pack_message_bigint(PG_FUNCTION_ARGS);
/* from plunit.c */
extern PGDLLEXPORT Datum plunit_assert_true(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plunit_assert_true_message(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plunit_assert_false(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plunit_assert_false_message(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plunit_assert_null(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plunit_assert_null_message(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plunit_assert_not_null(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plunit_assert_not_null_message(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plunit_assert_equals(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plunit_assert_equals_message(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plunit_assert_equals_range(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plunit_assert_equals_range_message(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plunit_assert_not_equals(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plunit_assert_not_equals_message(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plunit_assert_not_equals_range(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plunit_assert_not_equals_range_message(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plunit_fail(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plunit_fail_message(PG_FUNCTION_ARGS);
/* from plvdate.c */
extern PGDLLEXPORT Datum plvdate_add_bizdays(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvdate_nearest_bizday(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvdate_next_bizday(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvdate_bizdays_between(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvdate_prev_bizday(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvdate_isbizday(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvdate_set_nonbizday_dow(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvdate_unset_nonbizday_dow(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvdate_set_nonbizday_day(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvdate_unset_nonbizday_day(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvdate_use_easter(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvdate_using_easter(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvdate_include_start(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvdate_including_start(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvdate_default_holidays(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvdate_version(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvdate_days_inmonth(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvdate_isleapyear(PG_FUNCTION_ARGS);
/* from plvlec.c */
extern PGDLLEXPORT Datum plvlex_tokens(PG_FUNCTION_ARGS);
/* from plvstr.c */
extern PGDLLEXPORT Datum plvstr_rvrs(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvstr_normalize(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvstr_is_prefix_text(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvstr_is_prefix_int(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvstr_is_prefix_int64(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvstr_lpart(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvstr_rpart(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvstr_lstrip(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvstr_rstrip(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvstr_left(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvstr_right(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvstr_substr2(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvstr_substr3(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvstr_instr2(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvstr_instr3(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvstr_instr4(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvstr_betwn_i(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvstr_betwn_c(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvstr_swap(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvchr_nth(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvchr_first(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvchr_last(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvchr_is_kind_i(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvchr_is_kind_a(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvchr_char_name(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum oracle_substr2(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum oracle_substr3(PG_FUNCTION_ARGS);
/* from plvsubst.c */
extern PGDLLEXPORT Datum plvsubst_string_array(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvsubst_string_string(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvsubst_setsubst(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvsubst_setsubst_default(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum plvsubst_subst(PG_FUNCTION_ARGS);
/* from putline.c */
extern PGDLLEXPORT Datum dbms_output_enable(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_output_enable_default(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_output_disable(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_output_serveroutput(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_output_put(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_output_put_line(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_output_new_line(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_output_get_line(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_output_get_lines(PG_FUNCTION_ARGS);
/* from random.c */
extern PGDLLEXPORT Datum dbms_random_initialize(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_random_normal(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_random_random(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_random_seed_int(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_random_seed_varchar(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_random_string(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_random_terminate(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_random_value(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_random_value_range(PG_FUNCTION_ARGS);
/* from utility.c */
extern PGDLLEXPORT Datum dbms_utility_format_call_stack0(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum dbms_utility_format_call_stack1(PG_FUNCTION_ARGS);
/* from oraguc.c */
extern void PGDLLEXPORT _PG_init(void);
/* from charpad.c */
extern PGDLLEXPORT Datum orafce_lpad(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum orafce_rpad(PG_FUNCTION_ARGS);
/* from charlen.c */
extern PGDLLEXPORT Datum orafce_bpcharlen(PG_FUNCTION_ARGS);
/* from varchar2.c */
extern PGDLLEXPORT Datum varchar2in(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum varchar2out(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum varchar2(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum varchar2typmodin(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum varchar2recv(PG_FUNCTION_ARGS);
/* from nvarchar2.c */
extern PGDLLEXPORT Datum nvarchar2in(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum nvarchar2out(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum nvarchar2(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum nvarchar2typmodin(PG_FUNCTION_ARGS);
extern PGDLLEXPORT Datum nvarchar2recv(PG_FUNCTION_ARGS);
#endif