PostgreSQL Source Code git master
Loading...
Searching...
No Matches
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
8 .name = "bool_plperl",
9 .version = PG_VERSION
10);
11
13
16{
17 dTHX;
18 bool in = PG_GETARG_BOOL(0);
19
20 return PointerGetDatum(in ? &PL_sv_yes : &PL_sv_no);
21}
22
23
25
Datum bool_to_plperl(PG_FUNCTION_ARGS)
Definition bool_plperl.c:15
Datum plperl_to_bool(PG_FUNCTION_ARGS)
Definition bool_plperl.c:27
#define PG_GETARG_POINTER(n)
Definition fmgr.h:277
#define PG_MODULE_MAGIC_EXT(...)
Definition fmgr.h:540
#define PG_FUNCTION_INFO_V1(funcname)
Definition fmgr.h:417
#define PG_GETARG_BOOL(n)
Definition fmgr.h:274
#define PG_FUNCTION_ARGS
Definition fmgr.h:193
#define PG_RETURN_BOOL(x)
Definition fmgr.h:360
static Datum PointerGetDatum(const void *X)
Definition postgres.h:352
uint64_t Datum
Definition postgres.h:70
#define PL_sv_yes
Definition ppport.h:11781
#define dTHX
Definition ppport.h:11306
#define PL_sv_no
Definition ppport.h:11779
static int fb(int x)
const char * name