7#include "utils/fmgrprotos.h"
11 .
name =
"jsonb_plperl",
56 elog(
ERROR,
"unexpected jsonb value type: %d",
jbv->type);
75 if (v.
val.array.rawScalar)
82 elog(
ERROR,
"unexpected jsonb token: %d", r);
115 v.
val.string.val, v.
val.string.len,
125 elog(
ERROR,
"unexpected jsonb token: %d", r);
168 key.val.string.len = klen;
238 errmsg(
"cannot convert infinity to jsonb")));
242 errmsg(
"cannot convert NaN to jsonb")));
263 errmsg(
"cannot transform this Perl type to jsonb")));
Datum float8_numeric(PG_FUNCTION_ARGS)
Numeric int64_to_numeric(int64 val)
Datum numeric_out(PG_FUNCTION_ARGS)
Datum numeric_in(PG_FUNCTION_ARGS)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
#define palloc_object(type)
#define PG_GETARG_POINTER(n)
#define PG_MODULE_MAGIC_EXT(...)
#define DirectFunctionCall1(func, arg1)
#define PG_FUNCTION_INFO_V1(funcname)
#define DirectFunctionCall3(func, arg1, arg2, arg3)
#define PG_RETURN_JSONB_P(x)
#define PG_GETARG_JSONB_P(x)
static SV * JsonbValue_to_SV(JsonbValue *jbv)
static SV * Jsonb_to_SV(JsonbContainer *jsonb)
static void HV_to_JsonbValue(HV *obj, JsonbInState *jsonb_state)
static void SV_to_JsonbValue(SV *obj, JsonbInState *ps, bool is_elem)
Datum jsonb_to_plperl(PG_FUNCTION_ARGS)
static void AV_to_JsonbValue(AV *in, JsonbInState *jsonb_state)
Datum plperl_to_jsonb(PG_FUNCTION_ARGS)
void pushJsonbValue(JsonbInState *pstate, JsonbIteratorToken seq, JsonbValue *jbval)
JsonbIterator * JsonbIteratorInit(JsonbContainer *container)
JsonbIteratorToken JsonbIteratorNext(JsonbIterator **it, JsonbValue *val, bool skipNested)
Jsonb * JsonbValueToJsonb(JsonbValue *val)
void pfree(void *pointer)
char * pnstrdup(const char *in, Size len)
static Numeric DatumGetNumeric(Datum X)
static Datum NumericGetDatum(Numeric X)
static char * sv2cstr(SV *sv)
static SV * cstr2sv(const char *str)
static Datum PointerGetDatum(const void *X)
static Datum ObjectIdGetDatum(Oid X)
static char * DatumGetCString(Datum X)
static Datum Float8GetDatum(float8 X)
static Datum CStringGetDatum(const char *X)
static Datum Int32GetDatum(int32 X)