PostgreSQL Source Code: src/backend/utils/adt/pseudotypes.c Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
24
26#include "utils/fmgrprotos.h"
27
28
29
30
31
32
33
34#define PSEUDOTYPE_DUMMY_INPUT_FUNC(typname) \
35Datum \
36typname##_in(PG_FUNCTION_ARGS) \
37{ \
38 ereport(ERROR, \
39 (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), \
40 errmsg("cannot accept a value of type %s", #typname))); \
41\
42 PG_RETURN_VOID(); \
43} \
44\
45extern int no_such_variable
46
47#define PSEUDOTYPE_DUMMY_IO_FUNCS(typname) \
48PSEUDOTYPE_DUMMY_INPUT_FUNC(typname); \
49\
50Datum \
51typname##_out(PG_FUNCTION_ARGS) \
52{ \
53 ereport(ERROR, \
54 (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), \
55 errmsg("cannot display a value of type %s", #typname))); \
56\
57 PG_RETURN_VOID(); \
58} \
59\
60extern int no_such_variable
61
62
63
64
65
66
67
68#define PSEUDOTYPE_DUMMY_RECEIVE_FUNC(typname) \
69Datum \
70typname##_recv(PG_FUNCTION_ARGS) \
71{ \
72 ereport(ERROR, \
73 (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), \
74 errmsg("cannot accept a value of type %s", #typname))); \
75\
76 PG_RETURN_VOID(); \
77} \
78\
79extern int no_such_variable
80
81#define PSEUDOTYPE_DUMMY_BINARY_IO_FUNCS(typname) \
82PSEUDOTYPE_DUMMY_RECEIVE_FUNC(typname); \
83\
84Datum \
85typname##_send(PG_FUNCTION_ARGS) \
86{ \
87 ereport(ERROR, \
88 (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), \
89 errmsg("cannot display a value of type %s", #typname))); \
90\
91 PG_RETURN_VOID(); \
92} \
93\
94extern int no_such_variable
95
96
97
98
99
100
101
102
103
104
105
113
121
124{
126 char *str;
127 int nbytes;
128
131}
132
143
144
145
146
147
148
149
150
151
152
153
156
162
168
169
170
171
172
173
176
182
188
189
190
191
192
193
195
201
202
203
204
205
206
208
214
215
216
217
218
219
221
227
228
229
230
231
232
234
240
241
242
243
244
245
247
253
254
255
256
257
258
259
260
261
267
273
276{
277
278
279
280
282}
283
293
294
295
296
297
298
299
300
301
304{
307 errmsg("cannot accept a value of a shell type")));
308
310}
311
314{
317 errmsg("cannot display a value of a shell type")));
318
320}
321
322
323
324
325
326
327
328
329
330
331
332
333
336
342
348
349
350
351
352
353
354
355
356
357
360
361
362
363
364
Datum array_send(PG_FUNCTION_ARGS)
Datum array_out(PG_FUNCTION_ARGS)
int errcode(int sqlerrcode)
#define ereport(elevel,...)
Datum enum_out(PG_FUNCTION_ARGS)
#define PG_RETURN_BYTEA_P(x)
#define PG_GETARG_POINTER(n)
#define PG_RETURN_CSTRING(x)
#define PG_GETARG_CSTRING(n)
char * pstrdup(const char *in)
Datum multirange_out(PG_FUNCTION_ARGS)
static char buf[DEFAULT_XLOG_SEG_SIZE]
void pq_sendtext(StringInfo buf, const char *str, int slen)
char * pq_getmsgtext(StringInfo msg, int rawbytes, int *nbytes)
void pq_begintypsend(StringInfo buf)
bytea * pq_endtypsend(StringInfo buf)
Datum anyrange_out(PG_FUNCTION_ARGS)
Datum pg_node_tree_send(PG_FUNCTION_ARGS)
Datum anymultirange_out(PG_FUNCTION_ARGS)
#define PSEUDOTYPE_DUMMY_RECEIVE_FUNC(typname)
Datum cstring_out(PG_FUNCTION_ARGS)
Datum anycompatiblearray_send(PG_FUNCTION_ARGS)
Datum shell_in(PG_FUNCTION_ARGS)
Datum void_send(PG_FUNCTION_ARGS)
Datum void_in(PG_FUNCTION_ARGS)
Datum void_recv(PG_FUNCTION_ARGS)
Datum anycompatiblemultirange_out(PG_FUNCTION_ARGS)
#define PSEUDOTYPE_DUMMY_INPUT_FUNC(typname)
Datum cstring_recv(PG_FUNCTION_ARGS)
Datum anyarray_out(PG_FUNCTION_ARGS)
Datum pg_node_tree_out(PG_FUNCTION_ARGS)
#define PSEUDOTYPE_DUMMY_BINARY_IO_FUNCS(typname)
#define PSEUDOTYPE_DUMMY_IO_FUNCS(typname)
Datum void_out(PG_FUNCTION_ARGS)
Datum anyarray_send(PG_FUNCTION_ARGS)
Datum cstring_in(PG_FUNCTION_ARGS)
Datum anycompatiblerange_out(PG_FUNCTION_ARGS)
Datum anyenum_out(PG_FUNCTION_ARGS)
Datum shell_out(PG_FUNCTION_ARGS)
Datum anycompatiblearray_out(PG_FUNCTION_ARGS)
Datum cstring_send(PG_FUNCTION_ARGS)
Datum range_out(PG_FUNCTION_ARGS)
struct StringInfoData * StringInfo
Datum textsend(PG_FUNCTION_ARGS)
Datum textout(PG_FUNCTION_ARGS)