|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "access/htup_details.h"#include "catalog/pg_type.h"#include "funcapi.h"#include "libpq/pqformat.h"#include "miscadmin.h"#include "utils/builtins.h"#include "utils/fmgroids.h"#include "utils/json.h"#include "utils/jsonb.h"#include "utils/jsonfuncs.h"#include "utils/lsyscache.h"#include "utils/typcache.h"
Go to the source code of this file.
Data Structures | |
| struct | JsonbAggState |
Typedefs | |
| typedef struct JsonbAggState | JsonbAggState |
| typedef struct JsonbAggState JsonbAggState |
|
static |
Definition at line 607 of file jsonb.c.
References appendStringInfoCharMacro, and appendStringInfoSpaces().
Referenced by JsonbToCStringWorker().
|
static |
Definition at line 1052 of file jsonb.c.
References datum_to_jsonb_internal(), ereport, errcode(), errmsg, ERROR, fb(), InvalidOid, json_categorize_type(), JSONTYPE_NULL, and val.
Referenced by jsonb_build_array_worker(), and jsonb_build_object_worker().
|
static |
Definition at line 898 of file jsonb.c.
References array_dim_to_jsonb(), Assert, datum_to_jsonb_internal(), fb(), i, pushJsonbValue(), WJB_BEGIN_ARRAY, and WJB_END_ARRAY.
Referenced by array_dim_to_jsonb(), and array_to_jsonb_internal().
|
static |
Definition at line 930 of file jsonb.c.
References ARR_DIMS, ARR_ELEMTYPE, ARR_NDIM, array_dim_to_jsonb(), ArrayGetNItems(), DatumGetArrayTypeP, deconstruct_array(), fb(), get_typlenbyvalalign(), json_categorize_type(), nitems, pfree(), pushJsonbValue(), typalign, WJB_BEGIN_ARRAY, and WJB_END_ARRAY.
Referenced by datum_to_jsonb_internal().
Definition at line 1789 of file jsonb.c.
References elog, ereport, errcode(), errmsg, ERROR, fb(), gettext_noop, i, jbvArray, jbvBinary, jbvBool, jbvNull, jbvNumeric, jbvObject, jbvString, lengthof, and type.
Referenced by jsonb_bool(), jsonb_float4(), jsonb_float8(), jsonb_int2(), jsonb_int4(), jsonb_int8(), and jsonb_numeric().
Definition at line 269 of file jsonb.c.
References ereturn, errcode(), errdetail(), errmsg, fb(), JENTRY_OFFLENMASK, and len.
Referenced by datum_to_jsonb_internal(), jsonb_in_object_field_start(), and jsonb_in_scalar().
|
static |
Definition at line 978 of file jsonb.c.
References attname, datum_to_jsonb_internal(), DatumGetHeapTupleHeader, fb(), heap_getattr(), HeapTupleHeaderGetDatumLength(), HeapTupleHeaderGetTypeId(), HeapTupleHeaderGetTypMod(), i, InvalidOid, jbvString, json_categorize_type(), JSONTYPE_NULL, lookup_rowtype_tupdesc(), NameStr, TupleDescData::natts, pushJsonbValue(), ReleaseTupleDesc, TupleDescAttr(), JsonbValue::type, JsonbValue::val, val, WJB_BEGIN_OBJECT, WJB_END_OBJECT, and WJB_KEY.
Referenced by datum_to_jsonb_internal().
| Datum datum_to_jsonb | ( | Datum | val, |
| JsonTypeCategory | tcategory, | ||
| Oid | outfuncoid | ||
| ) |
Definition at line 1117 of file jsonb.c.
References datum_to_jsonb_internal(), fb(), JsonbPGetDatum(), JsonbValueToJsonb(), JsonbInState::result, and val.
Referenced by ExecEvalJsonConstructor(), and to_jsonb().
|
static |
Definition at line 630 of file jsonb.c.
References JsonSemAction::array_end, JsonSemAction::array_start, array_to_jsonb_internal(), Assert, check_stack_depth(), checkStringLen(), composite_to_jsonb(), JsonbParseState::contVal, CStringGetDatum(), DatumGetBool(), DatumGetInt16(), DatumGetInt32(), DatumGetInt64(), DatumGetJsonbP(), DatumGetNumeric(), DatumGetTextPP, DirectFunctionCall1, DirectFunctionCall3, elog, ereport, errcode(), errmsg, ERROR, fb(), float4_numeric(), float8_numeric(), freeJsonLexContext(), Int32GetDatum(), int64_to_numeric(), InvalidOid, JB_ROOT_IS_SCALAR, jbvArray, jbvBool, jbvNull, jbvNumeric, jbvObject, jbvString, jsonb_in_array_end(), jsonb_in_array_start(), jsonb_in_object_end(), jsonb_in_object_field_start(), jsonb_in_object_start(), jsonb_in_scalar(), JsonbIteratorInit(), JsonbIteratorNext(), JsonEncodeDateTime(), JSONTYPE_ARRAY, JSONTYPE_BOOL, JSONTYPE_CAST, JSONTYPE_COMPOSITE, JSONTYPE_DATE, JSONTYPE_JSON, JSONTYPE_JSONB, JSONTYPE_NUMERIC, JSONTYPE_TIMESTAMP, JSONTYPE_TIMESTAMPTZ, makeJsonLexContext(), numeric_in(), numeric_is_inf(), numeric_is_nan(), JsonSemAction::object_end, JsonSemAction::object_field_start, JsonSemAction::object_start, ObjectIdGetDatum(), OidFunctionCall1, OidOutputFunctionCall(), JsonbInState::parseState, pg_fallthrough, pg_parse_json_or_ereport, pushJsonbValue(), Jsonb::root, JsonSemAction::scalar, sem, JsonSemAction::semstate, type, JsonbValue::type, val, VARDATA_ANY(), VARSIZE_ANY_EXHDR(), WJB_BEGIN_ARRAY, WJB_BEGIN_OBJECT, WJB_DONE, WJB_ELEM, WJB_END_ARRAY, WJB_END_OBJECT, WJB_KEY, and WJB_VALUE.
Referenced by add_jsonb(), array_dim_to_jsonb(), composite_to_jsonb(), datum_to_jsonb(), jsonb_agg_transfn_worker(), and jsonb_object_agg_transfn_worker().
| Datum jsonb_agg_finalfn | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1549 of file jsonb.c.
References AggCheckCallContext(), arg, Assert, fb(), JsonbValueToJsonb(), JsonbInState::parseState, PG_ARGISNULL, PG_GETARG_POINTER, PG_RETURN_NULL, PG_RETURN_POINTER, pushJsonbValue(), JsonbInState::result, and WJB_END_ARRAY.
| Datum jsonb_agg_strict_transfn | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1543 of file jsonb.c.
References jsonb_agg_transfn_worker().
| Datum jsonb_agg_transfn | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1534 of file jsonb.c.
References jsonb_agg_transfn_worker().
|
static |
Definition at line 1475 of file jsonb.c.
References AggCheckCallContext(), datum_to_jsonb_internal(), elog, ereport, errcode(), errmsg, ERROR, fb(), FunctionCallInfoBaseData::flinfo, get_fn_expr_argtype(), InvalidOid, json_categorize_type(), MemoryContextAllocZero(), JsonbInState::outcontext, PG_ARGISNULL, PG_GETARG_DATUM, PG_GETARG_POINTER, PG_RETURN_POINTER, pushJsonbValue(), val, and WJB_BEGIN_ARRAY.
Referenced by jsonb_agg_strict_transfn(), and jsonb_agg_transfn().
| Datum jsonb_bool | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1819 of file jsonb.c.
References cannotCastJsonbValue(), jbvBool, jbvNull, JsonbExtractScalar(), PG_FREE_IF_COPY, PG_GETARG_JSONB_P, PG_RETURN_BOOL, PG_RETURN_NULL, Jsonb::root, JsonbValue::type, and JsonbValue::val.
| Datum jsonb_build_array | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1242 of file jsonb.c.
References extract_variadic_args(), jsonb_build_array_worker(), PG_RETURN_DATUM, PG_RETURN_NULL, and types.
| Datum jsonb_build_array_noargs | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1263 of file jsonb.c.
References fb(), JsonbValueToJsonb(), PG_RETURN_POINTER, pushJsonbValue(), JsonbInState::result, WJB_BEGIN_ARRAY, and WJB_END_ARRAY.
| Datum jsonb_build_array_worker | ( | int | nargs, |
| const Datum * | args, | ||
| const bool * | nulls, | ||
| const Oid * | types, | ||
| bool | absent_on_null | ||
| ) |
Definition at line 1215 of file jsonb.c.
References add_jsonb(), fb(), i, JsonbPGetDatum(), JsonbValueToJsonb(), pushJsonbValue(), JsonbInState::result, types, WJB_BEGIN_ARRAY, and WJB_END_ARRAY.
Referenced by ExecEvalJsonConstructor(), and jsonb_build_array().
| Datum jsonb_build_object | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1182 of file jsonb.c.
References extract_variadic_args(), jsonb_build_object_worker(), PG_RETURN_DATUM, PG_RETURN_NULL, and types.
| Datum jsonb_build_object_noargs | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1202 of file jsonb.c.
References fb(), JsonbValueToJsonb(), PG_RETURN_POINTER, pushJsonbValue(), JsonbInState::result, WJB_BEGIN_OBJECT, and WJB_END_OBJECT.
| Datum jsonb_build_object_worker | ( | int | nargs, |
| const Datum * | args, | ||
| const bool * | nulls, | ||
| const Oid * | types, | ||
| bool | absent_on_null, | ||
| bool | unique_keys | ||
| ) |
Definition at line 1130 of file jsonb.c.
References add_jsonb(), ereport, errcode(), errhint(), errmsg, ERROR, fb(), i, JsonbPGetDatum(), JsonbValueToJsonb(), JsonbInState::parseState, pushJsonbValue(), JsonbInState::result, skip, JsonbParseState::skip_nulls, types, JsonbParseState::unique_keys, WJB_BEGIN_OBJECT, and WJB_END_OBJECT.
Referenced by ExecEvalJsonConstructor(), and jsonb_build_object().
| Datum jsonb_float4 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1953 of file jsonb.c.
References cannotCastJsonbValue(), DirectFunctionCall1, fb(), jbvNull, jbvNumeric, JsonbExtractScalar(), numeric_float4(), NumericGetDatum(), PG_FREE_IF_COPY, PG_GETARG_JSONB_P, PG_RETURN_DATUM, PG_RETURN_NULL, Jsonb::root, JsonbValue::type, and JsonbValue::val.
| Datum jsonb_float8 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1980 of file jsonb.c.
References cannotCastJsonbValue(), DirectFunctionCall1, fb(), jbvNull, jbvNumeric, JsonbExtractScalar(), numeric_float8(), NumericGetDatum(), PG_FREE_IF_COPY, PG_GETARG_JSONB_P, PG_RETURN_DATUM, PG_RETURN_NULL, Jsonb::root, JsonbValue::type, and JsonbValue::val.
|
inlinestatic |
Definition at line 240 of file jsonb.c.
References JsonSemAction::array_end, JsonSemAction::array_start, fb(), GetDatabaseEncoding(), jsonb_in_array_end(), jsonb_in_array_start(), jsonb_in_object_end(), jsonb_in_object_field_start(), jsonb_in_object_start(), jsonb_in_scalar(), JsonbValueToJsonb(), len, makeJsonLexContextCstringLen(), JsonSemAction::object_end, JsonSemAction::object_field_start, JsonSemAction::object_start, pg_parse_json_or_errsave(), PG_RETURN_POINTER, JsonSemAction::scalar, sem, and JsonSemAction::semstate.
Referenced by jsonb_from_text(), jsonb_in(), and jsonb_recv().
Definition at line 139 of file jsonb.c.
References fb(), jsonb_from_cstring(), VARDATA_ANY(), and VARSIZE_ANY_EXHDR().
Referenced by ExecEvalJsonConstructor().
| Datum jsonb_in | ( | PG_FUNCTION_ARGS | ) |
Definition at line 64 of file jsonb.c.
References fb(), jsonb_from_cstring(), and PG_GETARG_CSTRING.
Referenced by ExecEvalJsonCoercion(), GetJsonBehaviorConst(), jsonb_set_lax(), JsonItemFromDatum(), and transformJsonBehavior().
|
static |
Definition at line 313 of file jsonb.c.
References fb(), JSON_SUCCESS, pushJsonbValue(), and WJB_END_ARRAY.
Referenced by datum_to_jsonb_internal(), and jsonb_from_cstring().
|
static |
Definition at line 303 of file jsonb.c.
References fb(), JSON_SUCCESS, pushJsonbValue(), and WJB_BEGIN_ARRAY.
Referenced by datum_to_jsonb_internal(), and jsonb_from_cstring().
|
static |
Definition at line 293 of file jsonb.c.
References fb(), JSON_SUCCESS, pushJsonbValue(), and WJB_END_OBJECT.
Referenced by datum_to_jsonb_internal(), and jsonb_from_cstring().
|
static |
Definition at line 323 of file jsonb.c.
References Assert, checkStringLen(), fb(), jbvString, JSON_SEM_ACTION_FAILED, JSON_SUCCESS, pushJsonbValue(), JsonbValue::type, JsonbValue::val, and WJB_KEY.
Referenced by datum_to_jsonb_internal(), and jsonb_from_cstring().
|
static |
Definition at line 282 of file jsonb.c.
References fb(), JSON_SUCCESS, pushJsonbValue(), and WJB_BEGIN_OBJECT.
Referenced by datum_to_jsonb_internal(), and jsonb_from_cstring().
|
static |
Definition at line 371 of file jsonb.c.
References Assert, checkStringLen(), DatumGetNumeric(), DirectInputFunctionCallSafe(), elog, ERROR, fb(), InvalidOid, jbvArray, jbvBool, jbvNull, jbvNumeric, jbvObject, jbvString, JSON_SEM_ACTION_FAILED, JSON_SUCCESS, JSON_TOKEN_FALSE, JSON_TOKEN_NULL, JSON_TOKEN_NUMBER, JSON_TOKEN_STRING, JSON_TOKEN_TRUE, numeric_in(), pushJsonbValue(), token, JsonbValue::type, JsonbValue::val, WJB_BEGIN_ARRAY, WJB_ELEM, WJB_END_ARRAY, and WJB_VALUE.
Referenced by datum_to_jsonb_internal(), and jsonb_from_cstring().
| Datum jsonb_int2 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1872 of file jsonb.c.
References cannotCastJsonbValue(), DirectFunctionCall1, fb(), jbvNull, jbvNumeric, JsonbExtractScalar(), numeric_int2(), NumericGetDatum(), PG_FREE_IF_COPY, PG_GETARG_JSONB_P, PG_RETURN_DATUM, PG_RETURN_NULL, Jsonb::root, JsonbValue::type, and JsonbValue::val.
| Datum jsonb_int4 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1899 of file jsonb.c.
References cannotCastJsonbValue(), DirectFunctionCall1, fb(), jbvNull, jbvNumeric, JsonbExtractScalar(), numeric_int4(), NumericGetDatum(), PG_FREE_IF_COPY, PG_GETARG_JSONB_P, PG_RETURN_DATUM, PG_RETURN_NULL, Jsonb::root, JsonbValue::type, and JsonbValue::val.
| Datum jsonb_int8 | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1926 of file jsonb.c.
References cannotCastJsonbValue(), DirectFunctionCall1, fb(), jbvNull, jbvNumeric, JsonbExtractScalar(), numeric_int8(), NumericGetDatum(), PG_FREE_IF_COPY, PG_GETARG_JSONB_P, PG_RETURN_DATUM, PG_RETURN_NULL, Jsonb::root, JsonbValue::type, and JsonbValue::val.
| Datum jsonb_numeric | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1842 of file jsonb.c.
References cannotCastJsonbValue(), DatumGetNumericCopy(), fb(), jbvNull, jbvNumeric, JsonbExtractScalar(), NumericGetDatum(), PG_FREE_IF_COPY, PG_GETARG_JSONB_P, PG_RETURN_NULL, PG_RETURN_NUMERIC, Jsonb::root, JsonbValue::type, and JsonbValue::val.
| Datum jsonb_object | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1284 of file jsonb.c.
References ARR_DIMS, ARR_NDIM, deconstruct_array_builtin(), ereport, errcode(), errmsg, ERROR, fb(), i, jbvNull, jbvString, JsonbValueToJsonb(), len, pfree(), PG_GETARG_ARRAYTYPE_P, PG_RETURN_POINTER, pushJsonbValue(), JsonbInState::result, str, TextDatumGetCString, JsonbValue::type, JsonbValue::val, WJB_BEGIN_OBJECT, WJB_END_OBJECT, WJB_KEY, and WJB_VALUE.
| Datum jsonb_object_agg_finalfn | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1707 of file jsonb.c.
References AggCheckCallContext(), arg, Assert, fb(), JsonbValueToJsonb(), JsonbInState::parseState, PG_ARGISNULL, PG_GETARG_POINTER, PG_RETURN_NULL, PG_RETURN_POINTER, pushJsonbValue(), JsonbInState::result, and WJB_END_OBJECT.
| Datum jsonb_object_agg_strict_transfn | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1683 of file jsonb.c.
References jsonb_object_agg_transfn_worker().
| Datum jsonb_object_agg_transfn | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1673 of file jsonb.c.
References jsonb_object_agg_transfn_worker().
|
static |
Definition at line 1582 of file jsonb.c.
References AggCheckCallContext(), datum_to_jsonb_internal(), elog, ereport, errcode(), errmsg, ERROR, fb(), FunctionCallInfoBaseData::flinfo, get_fn_expr_argtype(), InvalidOid, json_categorize_type(), MemoryContextAllocZero(), JsonbInState::outcontext, JsonbInState::parseState, PG_ARGISNULL, PG_GETARG_DATUM, PG_GETARG_POINTER, PG_RETURN_POINTER, pushJsonbValue(), skip, JsonbParseState::skip_nulls, JsonbParseState::unique_keys, val, and WJB_BEGIN_OBJECT.
Referenced by jsonb_object_agg_strict_transfn(), jsonb_object_agg_transfn(), jsonb_object_agg_unique_strict_transfn(), and jsonb_object_agg_unique_transfn().
| Datum jsonb_object_agg_unique_strict_transfn | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1701 of file jsonb.c.
References jsonb_object_agg_transfn_worker().
| Datum jsonb_object_agg_unique_transfn | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1692 of file jsonb.c.
References jsonb_object_agg_transfn_worker().
| Datum jsonb_object_two_arg | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1384 of file jsonb.c.
References ARR_NDIM, deconstruct_array_builtin(), ereport, errcode(), errmsg, ERROR, fb(), i, jbvNull, jbvString, JsonbValueToJsonb(), len, pfree(), PG_GETARG_ARRAYTYPE_P, PG_RETURN_POINTER, pushJsonbValue(), JsonbInState::result, str, TextDatumGetCString, JsonbValue::type, JsonbValue::val, WJB_BEGIN_OBJECT, WJB_END_OBJECT, WJB_KEY, and WJB_VALUE.
| Datum jsonb_out | ( | PG_FUNCTION_ARGS | ) |
Definition at line 99 of file jsonb.c.
References fb(), JsonbToCString(), PG_GETARG_JSONB_P, PG_RETURN_CSTRING, and VARSIZE().
Referenced by ExecEvalJsonExprPath(), and ExecGetJsonValueItemString().
|
static |
Definition at line 341 of file jsonb.c.
References appendBinaryStringInfo(), appendStringInfoString(), DatumGetCString(), DirectFunctionCall1, elog, ERROR, escape_json_with_len(), fb(), jbvBool, jbvNull, jbvNumeric, jbvString, StringInfoData::len, numeric_out(), and PointerGetDatum().
Referenced by JsonbToCStringWorker().
| Datum jsonb_recv | ( | PG_FUNCTION_ARGS | ) |
Definition at line 80 of file jsonb.c.
References buf, elog, ERROR, fb(), jsonb_from_cstring(), PG_GETARG_POINTER, pq_getmsgint(), pq_getmsgtext(), and str.
| Datum jsonb_send | ( | PG_FUNCTION_ARGS | ) |
Definition at line 115 of file jsonb.c.
References buf, fb(), initStringInfo(), JsonbToCString(), pfree(), PG_GETARG_JSONB_P, PG_RETURN_BYTEA_P, pq_begintypsend(), pq_endtypsend(), pq_sendint8(), pq_sendtext(), and VARSIZE().
| Datum jsonb_typeof | ( | PG_FUNCTION_ARGS | ) |
Definition at line 221 of file jsonb.c.
References cstring_to_text(), JsonbContainerTypeName(), PG_GETARG_JSONB_P, PG_RETURN_TEXT_P, and Jsonb::root.
|
static |
Definition at line 151 of file jsonb.c.
References elog, ERROR, JsonbContainer::header, JsonbExtractScalar(), JsonbTypeName(), JsonContainerIsArray, and JsonContainerIsObject.
Referenced by jsonb_typeof(), and JsonbTypeName().
| bool JsonbExtractScalar | ( | JsonbContainer * | jbc, |
| JsonbValue * | res | ||
| ) |
Definition at line 1749 of file jsonb.c.
References Assert, fb(), IsAJsonbScalar, jbvArray, jbvObject, JsonbIteratorInit(), JsonbIteratorNext(), JsonContainerIsArray, JsonContainerIsScalar, PG_USED_FOR_ASSERTS_ONLY, JsonbValue::type, JsonbValue::val, WJB_BEGIN_ARRAY, WJB_DONE, WJB_ELEM, and WJB_END_ARRAY.
Referenced by executeJsonPath(), jsonb_bool(), jsonb_float4(), jsonb_float8(), jsonb_int2(), jsonb_int4(), jsonb_int8(), jsonb_numeric(), JsonbContainerTypeName(), JsonbUnquote(), JsonItemFromDatum(), and JsonPathValue().
| char * JsonbToCString | ( | StringInfo | out, |
| JsonbContainer * | in, | ||
| int | estimated_len | ||
| ) |
Definition at line 465 of file jsonb.c.
References fb(), and JsonbToCStringWorker().
Referenced by jsonb_get_element(), jsonb_out(), jsonb_send(), JsonbUnquote(), JsonbValueAsText(), and populate_scalar().
| char * JsonbToCStringIndent | ( | StringInfo | out, |
| JsonbContainer * | in, | ||
| int | estimated_len | ||
| ) |
Definition at line 474 of file jsonb.c.
References fb(), and JsonbToCStringWorker().
Referenced by jsonb_pretty().
|
static |
Definition at line 483 of file jsonb.c.
References add_indent(), appendBinaryStringInfo(), appendStringInfoCharMacro, Assert, StringInfoData::data, elog, enlargeStringInfo(), ERROR, fb(), jsonb_put_escaped_value(), JsonbIteratorInit(), JsonbIteratorNext(), makeStringInfo(), type, JsonbValue::val, WJB_BEGIN_ARRAY, WJB_BEGIN_OBJECT, WJB_DONE, WJB_ELEM, WJB_END_ARRAY, WJB_END_OBJECT, WJB_KEY, and WJB_VALUE.
Referenced by JsonbToCString(), and JsonbToCStringIndent().
| const char * JsonbTypeName | ( | JsonbValue * | val | ) |
Definition at line 172 of file jsonb.c.
References elog, ERROR, fb(), jbvArray, jbvBinary, jbvBool, jbvDatetime, jbvNull, jbvNumeric, jbvObject, jbvString, JsonbContainerTypeName(), and val.
Referenced by executeItemOptUnwrapTarget(), and JsonbContainerTypeName().
Definition at line 2010 of file jsonb.c.
References DatumGetCString(), DirectFunctionCall1, elog, ERROR, fb(), JB_ROOT_IS_SCALAR, jbvBool, jbvNull, jbvNumeric, jbvString, JsonbExtractScalar(), JsonbToCString(), numeric_out(), pnstrdup(), PointerGetDatum(), pstrdup(), JsonbValue::type, JsonbValue::val, and VARSIZE().
Referenced by json_populate_type().
| Datum to_jsonb | ( | PG_FUNCTION_ARGS | ) |
Definition at line 1093 of file jsonb.c.
References datum_to_jsonb(), ereport, errcode(), errmsg, ERROR, fb(), get_fn_expr_argtype(), InvalidOid, json_categorize_type(), PG_GETARG_DATUM, PG_RETURN_DATUM, and val.
Definition at line 1081 of file jsonb.c.
References fb(), and json_check_mutability().
Referenced by contain_mutable_functions_walker().