PostgreSQL Source Code
git master
|
#include "postgres.h"
#include <math.h>
#include "fmgr.h"
#include "plperl.h"
#include "utils/fmgrprotos.h"
#include "utils/jsonb.h"
Go to the source code of this file.
Functions | |
static SV * | Jsonb_to_SV (JsonbContainer *jsonb) |
static JsonbValue * | SV_to_JsonbValue (SV *obj, JsonbParseState **ps, bool is_elem) |
static SV * | JsonbValue_to_SV (JsonbValue *jbv) |
static JsonbValue * | AV_to_JsonbValue (AV *in, JsonbParseState **jsonb_state) |
static JsonbValue * | HV_to_JsonbValue (HV *obj, JsonbParseState **jsonb_state) |
PG_FUNCTION_INFO_V1 (jsonb_to_plperl) | |
Datum | jsonb_to_plperl (PG_FUNCTION_ARGS) |
PG_FUNCTION_INFO_V1 (plperl_to_jsonb) | |
Datum | plperl_to_jsonb (PG_FUNCTION_ARGS) |
Variables | |
PG_MODULE_MAGIC | |
|
static |
Definition at line 128 of file jsonb_plperl.c.
References dTHX, i, pushJsonbValue(), SV_to_JsonbValue(), value, WJB_BEGIN_ARRAY, and WJB_END_ARRAY.
Referenced by SV_to_JsonbValue().
|
static |
Definition at line 148 of file jsonb_plperl.c.
References dTHX, jbvString, sort-test::key, pnstrdup(), pushJsonbValue(), SV_to_JsonbValue(), val, WJB_BEGIN_OBJECT, WJB_END_OBJECT, and WJB_KEY.
Referenced by SV_to_JsonbValue().
Datum jsonb_to_plperl | ( | PG_FUNCTION_ARGS | ) |
Definition at line 273 of file jsonb_plperl.c.
References dTHX, Jsonb_to_SV(), PG_GETARG_JSONB_P, PointerGetDatum(), and Jsonb::root.
|
static |
Definition at line 59 of file jsonb_plperl.c.
References av, dTHX, elog, ERROR, JsonbIteratorInit(), JsonbIteratorNext(), JsonbValue_to_SV(), JsonbValue::val, val, value, WJB_BEGIN_ARRAY, WJB_BEGIN_OBJECT, WJB_DONE, WJB_ELEM, WJB_END_ARRAY, WJB_KEY, and WJB_VALUE.
Referenced by jsonb_to_plperl(), and JsonbValue_to_SV().
|
static |
Definition at line 17 of file jsonb_plperl.c.
References cstr2sv(), DatumGetCString(), DirectFunctionCall1, dTHX, elog, ERROR, jbvBinary, jbvBool, jbvNull, jbvNumeric, jbvString, Jsonb_to_SV(), numeric_out(), NumericGetDatum(), pfree(), PL_sv_no, PL_sv_yes, pnstrdup(), str, JsonbValue::type, and JsonbValue::val.
Referenced by Jsonb_to_SV().
PG_FUNCTION_INFO_V1 | ( | jsonb_to_plperl | ) |
PG_FUNCTION_INFO_V1 | ( | plperl_to_jsonb | ) |
Datum plperl_to_jsonb | ( | PG_FUNCTION_ARGS | ) |
Definition at line 286 of file jsonb_plperl.c.
References dTHX, JsonbValueToJsonb(), PG_GETARG_POINTER, PG_RETURN_JSONB_P, and SV_to_JsonbValue().
|
static |
Definition at line 174 of file jsonb_plperl.c.
References AV_to_JsonbValue(), CStringGetDatum(), DatumGetNumeric(), DirectFunctionCall1, DirectFunctionCall3, dTHX, ereport, errcode(), errmsg(), ERROR, float8_numeric(), Float8GetDatum(), HV_to_JsonbValue(), Int32GetDatum(), int64_to_numeric(), InvalidOid, jbvNull, jbvNumeric, jbvString, numeric_in(), ObjectIdGetDatum(), palloc(), pushJsonbValue(), sv2cstr(), SvPV_nolen, JsonbValue::type, JsonbValue::val, WJB_ELEM, and WJB_VALUE.
Referenced by AV_to_JsonbValue(), HV_to_JsonbValue(), and plperl_to_jsonb().
PG_MODULE_MAGIC |
Definition at line 10 of file jsonb_plperl.c.