PostgreSQL Source Code: src/pl/plperl/plperl.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15#ifndef PL_PERL_H
16#define PL_PERL_H
17
18
20
21
22
23
24
26
27
41
42
43
44
45
46
47
48
49
50static inline char *
52{
53 char *ret;
54
56
57
58 if (ret == utf8_str)
60
61 return ret;
62}
63
64
65
66
67
68
69static inline char *
71{
72 char *ret;
73
75
76
77 if (ret == str)
79
80 return ret;
81}
82
83
84
85
86
87
88static inline char *
90{
92 char *val,
93 *res;
94 STRLEN len;
95
96
97
98
99
100
101
102
103
104
105
106
107 if (SvREADONLY(sv) ||
109 (SvTYPE(sv) > SVt_PVLV && SvTYPE(sv) != SVt_PVFM))
110 sv = newSVsv(sv);
111 else
112 {
113
114
115
116
118 }
119
120
121
122
123
124
127 else
129
130
131
132
133
135
136
137 SvREFCNT_dec(sv);
138
139 return res;
140}
141
142
143
144
145
146static inline SV *
148{
150 SV *sv;
151 char *utf8_str;
152
153
155 return newSVpv(str, 0);
156
158
159 sv = newSVpv(utf8_str, 0);
160 SvUTF8_on(sv);
162
163 return sv;
164}
165
166
167
168
169
170
171
172
173
174static inline void
176{
178
179#ifdef croak_sv
180
182#else
183
184
185
186
187
188
189
190
191 SV *errsv = get_sv("@", GV_ADD);
193 SV *ssv;
194
195 ssv = mess("%s", utf8_str);
196 SvUTF8_on(ssv);
197
199
200 sv_setsv(errsv, ssv);
201
202 croak(NULL);
203#endif
204}
205
206#endif
int GetDatabaseEncoding(void)
char * pg_any_to_server(const char *s, int len, int encoding)
char * pg_server_to_any(const char *s, int len, int encoding)
char * pstrdup(const char *in)
void pfree(void *pointer)
void plperl_return_next(SV *)
char * plperl_sv_to_literal(SV *, char *)
void plperl_spi_cursor_close(char *)
void plperl_spi_rollback(void)
static char * sv2cstr(SV *sv)
SV * plperl_spi_fetchrow(char *)
static char * utf_e2u(const char *str)
static char * utf_u2e(char *utf8_str, size_t len)
static void croak_cstr(const char *str)
HV * plperl_spi_exec_prepared(char *, HV *, int, SV **)
static SV * cstr2sv(const char *str)
HV * plperl_spi_exec(char *, int)
SV * plperl_spi_query(char *)
SV * plperl_spi_prepare(char *, int, SV **)
void plperl_util_elog(int level, SV *msg)
SV * plperl_spi_query_prepared(char *, int, SV **)
void plperl_spi_commit(void)
void plperl_spi_freeplan(char *)
#define SvREFCNT_inc_simple_void(sv)