PostgreSQL Source Code
git master
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
c
d
g
h
i
k
l
m
p
r
s
t
Functions
Variables
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
c
d
f
h
i
n
o
p
r
s
t
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
bool_plperl.c
Go to the documentation of this file.
1
#include "
postgres.h
"
2
3
#include "
fmgr.h
"
4
#include "
plperl.h
"
5
6
7
PG_MODULE_MAGIC_EXT
(
8
.
name
=
"bool_plperl"
,
9
.version = PG_VERSION
10
);
11
12
PG_FUNCTION_INFO_V1
(
bool_to_plperl
);
13
14
Datum
15
bool_to_plperl
(
PG_FUNCTION_ARGS
)
16
{
17
dTHX
;
18
bool
in =
PG_GETARG_BOOL
(0);
19
20
return
PointerGetDatum
(in ? &
PL_sv_yes
: &
PL_sv_no
);
21
}
22
23
24
PG_FUNCTION_INFO_V1
(
plperl_to_bool
);
25
26
Datum
27
plperl_to_bool
(
PG_FUNCTION_ARGS
)
28
{
29
dTHX
;
30
SV *in = (SV *)
PG_GETARG_POINTER
(0);
31
32
PG_RETURN_BOOL
(SvTRUE(in));
33
}
PG_FUNCTION_INFO_V1
PG_FUNCTION_INFO_V1(bool_to_plperl)
PG_MODULE_MAGIC_EXT
PG_MODULE_MAGIC_EXT(.name="bool_plperl",.version=PG_VERSION)
bool_to_plperl
Datum bool_to_plperl(PG_FUNCTION_ARGS)
Definition:
bool_plperl.c:15
plperl_to_bool
Datum plperl_to_bool(PG_FUNCTION_ARGS)
Definition:
bool_plperl.c:27
fmgr.h
PG_GETARG_POINTER
#define PG_GETARG_POINTER(n)
Definition:
fmgr.h:276
PG_GETARG_BOOL
#define PG_GETARG_BOOL(n)
Definition:
fmgr.h:274
PG_FUNCTION_ARGS
#define PG_FUNCTION_ARGS
Definition:
fmgr.h:193
PG_RETURN_BOOL
#define PG_RETURN_BOOL(x)
Definition:
fmgr.h:359
plperl.h
postgres.h
PointerGetDatum
static Datum PointerGetDatum(const void *X)
Definition:
postgres.h:327
Datum
uintptr_t Datum
Definition:
postgres.h:69
PL_sv_yes
#define PL_sv_yes
Definition:
ppport.h:11781
dTHX
#define dTHX
Definition:
ppport.h:11306
PL_sv_no
#define PL_sv_no
Definition:
ppport.h:11779
name
const char * name
Definition:
wait_event_funcs.c:28
contrib
bool_plperl
bool_plperl.c
Generated on Mon May 5 2025 18:13:13 for PostgreSQL Source Code by
1.9.4