PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "catalog/pg_collation.h"
#include "catalog/pg_type.h"
#include "funcapi.h"
#include "lib/stringinfo.h"
#include "miscadmin.h"
#include "nodes/miscnodes.h"
#include "regex/regex.h"
#include "utils/builtins.h"
#include "utils/date.h"
#include "utils/datetime.h"
#include "utils/datum.h"
#include "utils/float.h"
#include "utils/formatting.h"
#include "utils/guc.h"
#include "utils/json.h"
#include "utils/jsonpath.h"
#include "utils/timestamp.h"
#include "utils/varlena.h"
Go to the source code of this file.
Data Structures | |
struct | JsonBaseObjectInfo |
struct | JsonPathExecContext |
struct | JsonLikeRegexContext |
struct | JsonValueList |
struct | JsonValueListIterator |
Macros | |
#define | jperIsError(jper) ((jper) == jperError) |
#define | jspStrictAbsenseOfErrors(cxt) (!(cxt)->laxMode) |
#define | jspAutoUnwrap(cxt) ((cxt)->laxMode) |
#define | jspAutoWrap(cxt) ((cxt)->laxMode) |
#define | jspIgnoreStructuralErrors(cxt) ((cxt)->ignoreStructuralErrors) |
#define | jspThrowErrors(cxt) ((cxt)->throwErrors) |
#define | RETURN_ERROR(throw_error) |
Typedefs | |
typedef struct JsonBaseObjectInfo | JsonBaseObjectInfo |
typedef struct JsonPathExecContext | JsonPathExecContext |
typedef struct JsonLikeRegexContext | JsonLikeRegexContext |
typedef enum JsonPathBool | JsonPathBool |
typedef enum JsonPathExecResult | JsonPathExecResult |
typedef struct JsonValueList | JsonValueList |
typedef struct JsonValueListIterator | JsonValueListIterator |
typedef JsonPathBool(* | JsonPathPredicateCallback) (JsonPathItem *jsp, JsonbValue *larg, JsonbValue *rarg, void *param) |
typedef Numeric(* | BinaryArithmFunc) (Numeric num1, Numeric num2, bool *error) |
Enumerations | |
enum | JsonPathBool { jpbFalse = 0 , jpbTrue = 1 , jpbUnknown = 2 } |
enum | JsonPathExecResult { jperOk = 0 , jperNotFound = 1 , jperError = 2 } |
#define jperIsError | ( | jper | ) | ((jper) == jperError) |
Definition at line 137 of file jsonpath_exec.c.
#define jspAutoUnwrap | ( | cxt | ) | ((cxt)->laxMode) |
Definition at line 157 of file jsonpath_exec.c.
#define jspAutoWrap | ( | cxt | ) | ((cxt)->laxMode) |
Definition at line 158 of file jsonpath_exec.c.
#define jspIgnoreStructuralErrors | ( | cxt | ) | ((cxt)->ignoreStructuralErrors) |
Definition at line 159 of file jsonpath_exec.c.
#define jspStrictAbsenseOfErrors | ( | cxt | ) | (!(cxt)->laxMode) |
Definition at line 156 of file jsonpath_exec.c.
#define jspThrowErrors | ( | cxt | ) | ((cxt)->throwErrors) |
Definition at line 160 of file jsonpath_exec.c.
#define RETURN_ERROR | ( | throw_error | ) |
Definition at line 163 of file jsonpath_exec.c.
Definition at line 175 of file jsonpath_exec.c.
typedef struct JsonBaseObjectInfo JsonBaseObjectInfo |
typedef struct JsonLikeRegexContext JsonLikeRegexContext |
typedef enum JsonPathBool JsonPathBool |
typedef struct JsonPathExecContext JsonPathExecContext |
typedef enum JsonPathExecResult JsonPathExecResult |
typedef JsonPathBool(* JsonPathPredicateCallback) (JsonPathItem *jsp, JsonbValue *larg, JsonbValue *rarg, void *param) |
Definition at line 171 of file jsonpath_exec.c.
typedef struct JsonValueList JsonValueList |
typedef struct JsonValueListIterator JsonValueListIterator |
enum JsonPathBool |
enum JsonPathExecResult |
|
static |
Definition at line 2052 of file jsonpath_exec.c.
References executeNextItem(), jbvBool, jbvNull, jpbTrue, jpbUnknown, jperOk, jspGetNext(), next, res, JsonbValue::type, and JsonbValue::val.
Referenced by executeItemOptUnwrapTarget().
|
static |
Definition at line 2186 of file jsonpath_exec.c.
References cmp(), Min, s1, and s2.
Referenced by compareStrings().
Definition at line 2604 of file jsonpath_exec.c.
References checkTimezoneIsUsedForCast(), DirectFunctionCall1, and time_timetz().
Referenced by compareDatetime().
|
static |
Definition at line 2592 of file jsonpath_exec.c.
References ereport, errcode(), errhint(), errmsg(), and ERROR.
Referenced by castTimeToTimeTz(), cmpDateToTimestampTz(), and cmpTimestampToTimestampTz().
Definition at line 2616 of file jsonpath_exec.c.
References date_cmp_timestamp_internal().
Referenced by compareDatetime().
|
static |
Definition at line 2625 of file jsonpath_exec.c.
References checkTimezoneIsUsedForCast(), and date_cmp_timestamptz_internal().
Referenced by compareDatetime().
|
static |
Definition at line 2636 of file jsonpath_exec.c.
References checkTimezoneIsUsedForCast(), and timestamp_cmp_timestamptz_internal().
Referenced by compareDatetime().
|
static |
Definition at line 2649 of file jsonpath_exec.c.
References castTimeToTimeTz(), cmpDateToTimestamp(), cmpDateToTimestampTz(), cmpTimestampToTimestampTz(), date_cmp(), DatumGetDateADT(), DatumGetInt32(), DatumGetTimestamp(), DatumGetTimestampTz(), DirectFunctionCall2, elog(), ERROR, time_cmp(), timestamp_cmp(), and timetz_cmp().
Referenced by compareItems().
|
static |
Definition at line 2274 of file jsonpath_exec.c.
References cmp(), compareDatetime(), compareNumeric(), compareStrings(), elog(), ERROR, jbvArray, jbvBinary, jbvBool, jbvDatetime, jbvNull, jbvNumeric, jbvObject, jbvString, jpbFalse, jpbTrue, jpbUnknown, jpiEqual, jpiGreater, jpiGreaterOrEqual, jpiLess, jpiLessOrEqual, jpiNotEqual, res, JsonbValue::type, and JsonbValue::val.
Referenced by executeComparison().
Definition at line 2370 of file jsonpath_exec.c.
References a, b, DatumGetInt32(), DirectFunctionCall2, numeric_cmp(), and NumericGetDatum().
Referenced by compareItems().
|
static |
Definition at line 2207 of file jsonpath_exec.c.
References binaryCompareStrings(), cmp(), GetDatabaseEncoding(), pfree(), pg_server_to_any(), PG_SQL_ASCII, and PG_UTF8.
Referenced by compareItems().
|
static |
Definition at line 2378 of file jsonpath_exec.c.
References palloc().
Referenced by executeAnyItem(), and executeNextItem().
|
static |
Definition at line 1381 of file jsonpath_exec.c.
References Assert(), check_stack_depth(), copyJsonbValue(), executeItemOptUnwrapTarget(), JsonPathExecContext::ignoreStructuralErrors, jbvBinary, jperIsError, jperNotFound, jperOk, JsonbIteratorInit(), JsonbIteratorNext(), JsonValueListAppend(), PG_UINT32_MAX, res, JsonbValue::type, JsonbValue::val, WJB_DONE, WJB_ELEM, WJB_KEY, and WJB_VALUE.
Referenced by executeItemOptUnwrapTarget(), and executeItemUnwrapTargetArray().
|
static |
Definition at line 1552 of file jsonpath_exec.c.
References ereport, errcode(), errmsg(), ERROR, error(), executeItemOptUnwrapResult(), executeNextItem(), getScalar(), jbvNumeric, jperError, jperIsError, jperOk, JsonValueListHead(), JsonValueListLength(), jspGetLeftArg(), jspGetNext(), jspGetRightArg(), jspOperationName(), jspThrowErrors, palloc(), res, RETURN_ERROR, JsonbValue::type, JsonPathItem::type, and JsonbValue::val.
Referenced by executeItemOptUnwrapTarget().
|
static |
Definition at line 1227 of file jsonpath_exec.c.
References JsonPathItem::base, JsonPathItem::content, elog(), ERROR, executeComparison(), executeItemOptUnwrapResultNoThrow(), executeLikeRegex(), executePredicate(), executeStartsWith(), jpbFalse, jpbTrue, jpbUnknown, jperIsError, jperOk, jpiAnd, jpiEqual, jpiExists, jpiGreater, jpiGreaterOrEqual, jpiIsUnknown, jpiLess, jpiLessOrEqual, jpiLikeRegex, jpiNot, jpiNotEqual, jpiOr, jpiStartsWith, JsonValueListIsEmpty(), jspGetArg(), jspGetLeftArg(), jspGetRightArg(), jspHasNext, jspInitByBuffer(), jspStrictAbsenseOfErrors, JsonPathItem::like_regex, res, and JsonPathItem::type.
Referenced by executeItemOptUnwrapTarget(), and executeNestedBoolItem().
|
static |
Definition at line 2175 of file jsonpath_exec.c.
References cmp(), compareItems(), and JsonPathExecContext::useTz.
Referenced by executeBoolItem().
|
static |
Definition at line 1781 of file jsonpath_exec.c.
References JsonPathItem::arg, collid, JsonPathItem::content, cstring_to_text(), cstring_to_text_with_len(), elog(), ereport, errcode(), errhint(), errmsg(), ERROR, ErrorSaveContext::error_occurred, executeNextItem(), getScalar(), i, jbvDatetime, jbvString, jperError, jperIsError, jperNotFound, jperOk, jpiString, jspGetArg(), jspGetNext(), jspGetString(), jspOperationName(), jspThrowErrors, lengthof, MemoryContextSwitchTo(), palloc(), parse_datetime(), pfree(), res, RETURN_ERROR, text_to_cstring(), TopMemoryContext, JsonbValue::type, JsonPathItem::type, JsonbValue::val, and value.
Referenced by executeItemOptUnwrapTarget().
|
static |
Definition at line 600 of file jsonpath_exec.c.
References executeItemOptUnwrapTarget(), and jspAutoUnwrap.
Referenced by executeItemOptUnwrapResult(), executeJsonPath(), executeNextItem(), and getArrayIndex().
|
static |
Definition at line 1175 of file jsonpath_exec.c.
References Assert(), executeItem(), executeItemUnwrapTargetArray(), jbvArray, jperIsError, jperOk, JsonbType(), JsonValueListAppend(), JsonValueListInitIterator(), JsonValueListNext(), jspAutoUnwrap, res, and JsonbValue::type.
Referenced by executeBinaryArithmExpr(), executeItemOptUnwrapResultNoThrow(), and executeUnaryArithmExpr().
|
static |
Definition at line 1210 of file jsonpath_exec.c.
References executeItemOptUnwrapResult(), res, and JsonPathExecContext::throwErrors.
Referenced by executeBoolItem(), and executePredicate().
|
static |
Definition at line 612 of file jsonpath_exec.c.
References JsonPathItem::anybounds, appendBoolResult(), JsonPathItem::array, Assert(), JsonPathExecContext::baseObject, CHECK_FOR_INTERRUPTS, check_stack_depth(), JsonPathItem::content, JsonPathExecContext::current, DatumGetCString(), DatumGetNumeric(), DirectFunctionCall1, elog(), ereport, errcode(), errmsg(), ERROR, ErrorSaveContext::error_occurred, executeAnyItem(), executeBinaryArithmExpr(), executeBoolItem(), executeDateTimeMethod(), executeItemUnwrapTargetArray(), executeKeyValueMethod(), executeNestedBoolItem(), executeNextItem(), executeNumericItemMethod(), executeUnaryArithmExpr(), findJsonbValueFromContainer(), float8_numeric(), Float8GetDatum(), float8in_internal(), getArrayIndex(), getIthJsonbValueFromContainer(), getJsonPathItem(), i, JsonPathExecContext::ignoreStructuralErrors, JsonPathExecContext::innermostArraySize, int64_to_numeric(), JB_FOBJECT, jbvArray, jbvBinary, jbvNumeric, jbvObject, jbvString, jpbTrue, jperError, jperIsError, jperNotFound, jperOk, jpiAbs, jpiAdd, jpiAnd, jpiAny, jpiAnyArray, jpiAnyKey, jpiBool, jpiCeiling, jpiCurrent, jpiDatetime, jpiDiv, jpiDouble, jpiEqual, jpiExists, jpiFilter, jpiFloor, jpiGreater, jpiGreaterOrEqual, jpiIndexArray, jpiIsUnknown, jpiKey, jpiKeyValue, jpiLast, jpiLess, jpiLessOrEqual, jpiLikeRegex, jpiMinus, jpiMod, jpiMul, jpiNot, jpiNotEqual, jpiNull, jpiNumeric, jpiOr, jpiPlus, jpiRoot, jpiSize, jpiStartsWith, jpiString, jpiSub, jpiType, jpiVariable, JsonbArraySize(), JsonbType(), JsonbTypeName(), jspAutoUnwrap, jspAutoWrap, jspGetArg(), jspGetArraySubscript(), jspGetNext(), jspGetString(), jspHasNext, jspIgnoreStructuralErrors, jspOperationName(), jspThrowErrors, sort-test::key, numeric_abs(), numeric_add_opt_error(), numeric_ceil(), numeric_div_opt_error(), numeric_floor(), numeric_mod_opt_error(), numeric_mul_opt_error(), numeric_out(), numeric_sub_opt_error(), numeric_uminus(), NumericGetDatum(), palloc(), pfree(), pnstrdup(), pstrdup(), range(), res, RETURN_ERROR, JsonPathExecContext::root, setBaseObject(), JsonbValue::type, JsonPathItem::type, JsonbValue::val, and val.
Referenced by executeAnyItem(), and executeItem().
|
static |
Definition at line 1124 of file jsonpath_exec.c.
References Assert(), elog(), ERROR, executeAnyItem(), jbvArray, jbvBinary, JsonbValue::type, and JsonbValue::val.
Referenced by executeItemOptUnwrapResult(), executeItemOptUnwrapTarget(), and executeNumericItemMethod().
|
static |
Definition at line 540 of file jsonpath_exec.c.
References Assert(), JsonPathExecContext::baseObject, JsonPathExecContext::current, ereport, errcode(), errdetail(), errmsg(), ERROR, executeItem(), JsonPath::header, JsonBaseObjectInfo::id, JsonPathExecContext::ignoreStructuralErrors, JsonPathExecContext::innermostArraySize, JsonBaseObjectInfo::jbc, jperIsError, jperNotFound, jperOk, JsonbExtractScalar(), JsonbInitBinary(), JsonContainerIsObject, JSONPATH_LAX, JsonValueListIsEmpty(), jspInit(), jspStrictAbsenseOfErrors, JsonPathExecContext::lastGeneratedObjectId, JsonPathExecContext::laxMode, res, JsonPathExecContext::root, Jsonb::root, JsonPathExecContext::throwErrors, JsonPathExecContext::useTz, and JsonPathExecContext::vars.
Referenced by jsonb_path_exists_internal(), jsonb_path_match_internal(), jsonb_path_query_array_internal(), jsonb_path_query_first_internal(), and jsonb_path_query_internal().
|
static |
Definition at line 1942 of file jsonpath_exec.c.
References Assert(), JsonPathExecContext::baseObject, ereport, errcode(), errmsg(), ERROR, executeNextItem(), JsonBaseObjectInfo::id, int64_to_numeric(), JsonBaseObjectInfo::jbc, jbvBinary, jbvNumeric, jbvObject, jbvString, jperIsError, jperNotFound, jperOk, JsonbInitBinary(), JsonbIteratorInit(), JsonbIteratorNext(), JsonbType(), JsonbValueToJsonb(), JsonContainerSize, jspGetNext(), jspOperationName(), sort-test::key, JsonPathExecContext::lastGeneratedObjectId, next, ps, pushJsonbValue(), res, RETURN_ERROR, setBaseObject(), JsonbValue::type, JsonPathItem::type, JsonbValue::val, val, WJB_BEGIN_OBJECT, WJB_DONE, WJB_END_OBJECT, WJB_KEY, and WJB_VALUE.
Referenced by executeItemOptUnwrapTarget().
|
static |
Definition at line 1714 of file jsonpath_exec.c.
References JsonLikeRegexContext::cflags, JsonPathItem::content, cstring_to_text_with_len(), getScalar(), jbvString, jpbFalse, jpbTrue, jpbUnknown, jspConvertRegexFlags(), JsonPathItem::like_regex, RE_compile_and_execute(), JsonLikeRegexContext::regex, and generate_unaccent_rules::str.
Referenced by executeBoolItem().
|
static |
Definition at line 1360 of file jsonpath_exec.c.
References JsonPathExecContext::current, executeBoolItem(), and res.
Referenced by executeItemOptUnwrapTarget().
|
static |
Definition at line 1144 of file jsonpath_exec.c.
References copyJsonbValue(), cur, executeItem(), jperOk, JsonValueListAppend(), jspGetNext(), jspHasNext, and next.
Referenced by appendBoolResult(), executeBinaryArithmExpr(), executeDateTimeMethod(), executeItemOptUnwrapTarget(), executeKeyValueMethod(), executeNumericItemMethod(), and executeUnaryArithmExpr().
|
static |
Definition at line 1745 of file jsonpath_exec.c.
References DatumGetNumeric(), DirectFunctionCall1, ereport, errcode(), errmsg(), ERROR, executeItemUnwrapTargetArray(), executeNextItem(), getScalar(), jbvArray, jbvNumeric, jperOk, JsonbType(), jspGetNext(), jspOperationName(), next, NumericGetDatum(), palloc(), RETURN_ERROR, JsonbValue::type, JsonPathItem::type, and JsonbValue::val.
Referenced by executeItemOptUnwrapTarget().
|
static |
Definition at line 1472 of file jsonpath_exec.c.
References error(), executeItemOptUnwrapResultNoThrow(), jpbFalse, jpbTrue, jpbUnknown, jperIsError, JsonValueListInitIterator(), JsonValueListNext(), jspStrictAbsenseOfErrors, and res.
Referenced by executeBoolItem().
|
static |
Definition at line 1690 of file jsonpath_exec.c.
References getScalar(), jbvString, jpbFalse, jpbTrue, jpbUnknown, and JsonbValue::val.
Referenced by executeBoolItem().
|
static |
Definition at line 1623 of file jsonpath_exec.c.
References DatumGetNumeric(), DirectFunctionCall1, ereport, errcode(), errmsg(), ERROR, executeItemOptUnwrapResult(), executeNextItem(), getScalar(), jbvNumeric, jperIsError, jperNotFound, jperOk, JsonValueListInitIterator(), JsonValueListNext(), jspGetArg(), jspGetNext(), jspOperationName(), NumericGetDatum(), RETURN_ERROR, JsonPathItem::type, and val.
Referenced by executeItemOptUnwrapTarget().
|
static |
Definition at line 2392 of file jsonpath_exec.c.
References DatumGetNumeric(), DirectFunctionCall2, ereport, errcode(), errmsg(), ERROR, executeItem(), getScalar(), Int32GetDatum(), jbvNumeric, jperIsError, jperOk, JsonValueListHead(), JsonValueListLength(), numeric_int4_opt_error(), numeric_trunc(), NumericGetDatum(), res, RETURN_ERROR, and JsonbValue::val.
Referenced by executeItemOptUnwrapTarget().
|
static |
Definition at line 2080 of file jsonpath_exec.c.
References elog(), ERROR, getJsonPathVariable(), jbvBool, jbvNull, jbvNumeric, jbvString, jpiBool, jpiNull, jpiNumeric, jpiString, jpiVariable, jspGetBool(), jspGetNumeric(), jspGetString(), JsonPathItem::type, value, and JsonPathExecContext::vars.
Referenced by executeItemOptUnwrapTarget().
|
static |
Definition at line 2113 of file jsonpath_exec.c.
References Assert(), ereport, errcode(), errmsg(), ERROR, findJsonbValueFromContainer(), JB_FOBJECT, jbvNull, jbvString, jpiVariable, JsonbInitBinary(), jspGetString(), pfree(), pnstrdup(), setBaseObject(), JsonbValue::type, variable::type, JsonbValue::val, and value.
Referenced by getJsonPathItem().
|
static |
Definition at line 2564 of file jsonpath_exec.c.
References Assert(), jbvBinary, JsonContainerIsScalar, generate_unaccent_rules::type, JsonbValue::type, and JsonbValue::val.
Referenced by executeBinaryArithmExpr(), executeDateTimeMethod(), executeLikeRegex(), executeNumericItemMethod(), executeStartsWith(), executeUnaryArithmExpr(), and getArrayIndex().
Datum jsonb_path_exists | ( | PG_FUNCTION_ARGS | ) |
Definition at line 299 of file jsonpath_exec.c.
References jsonb_path_exists_internal().
|
static |
Definition at line 273 of file jsonpath_exec.c.
References executeJsonPath(), jperIsError, jperOk, PG_FREE_IF_COPY, PG_GETARG_BOOL, PG_GETARG_JSONB_P, PG_GETARG_JSONPATH_P, PG_NARGS, PG_RETURN_BOOL, PG_RETURN_NULL, and res.
Referenced by jsonb_path_exists(), jsonb_path_exists_opr(), and jsonb_path_exists_tz().
Datum jsonb_path_exists_opr | ( | PG_FUNCTION_ARGS | ) |
Datum jsonb_path_exists_tz | ( | PG_FUNCTION_ARGS | ) |
Definition at line 305 of file jsonpath_exec.c.
References jsonb_path_exists_internal().
Datum jsonb_path_match | ( | PG_FUNCTION_ARGS | ) |
Definition at line 367 of file jsonpath_exec.c.
References jsonb_path_match_internal().
|
static |
Definition at line 328 of file jsonpath_exec.c.
References ereport, errcode(), errmsg(), ERROR, executeJsonPath(), jbvBool, jbvNull, JsonValueListHead(), JsonValueListLength(), PG_FREE_IF_COPY, PG_GETARG_BOOL, PG_GETARG_JSONB_P, PG_GETARG_JSONPATH_P, PG_NARGS, PG_RETURN_BOOL, PG_RETURN_NULL, JsonbValue::type, and JsonbValue::val.
Referenced by jsonb_path_match(), jsonb_path_match_opr(), and jsonb_path_match_tz().
Datum jsonb_path_match_opr | ( | PG_FUNCTION_ARGS | ) |
Datum jsonb_path_match_tz | ( | PG_FUNCTION_ARGS | ) |
Definition at line 373 of file jsonpath_exec.c.
References jsonb_path_match_internal().
Datum jsonb_path_query | ( | PG_FUNCTION_ARGS | ) |
Definition at line 442 of file jsonpath_exec.c.
References jsonb_path_query_internal().
Datum jsonb_path_query_array | ( | PG_FUNCTION_ARGS | ) |
Definition at line 473 of file jsonpath_exec.c.
References jsonb_path_query_array_internal().
|
static |
Definition at line 459 of file jsonpath_exec.c.
References executeJsonPath(), JsonbValueToJsonb(), PG_GETARG_BOOL, PG_GETARG_JSONB_P, PG_GETARG_JSONPATH_P, PG_RETURN_JSONB_P, and wrapItemsInArray().
Referenced by jsonb_path_query_array(), and jsonb_path_query_array_tz().
Datum jsonb_path_query_array_tz | ( | PG_FUNCTION_ARGS | ) |
Definition at line 479 of file jsonpath_exec.c.
References jsonb_path_query_array_internal().
Datum jsonb_path_query_first | ( | PG_FUNCTION_ARGS | ) |
Definition at line 507 of file jsonpath_exec.c.
References jsonb_path_query_first_internal().
|
static |
Definition at line 490 of file jsonpath_exec.c.
References executeJsonPath(), JsonbValueToJsonb(), JsonValueListHead(), JsonValueListLength(), PG_GETARG_BOOL, PG_GETARG_JSONB_P, PG_GETARG_JSONPATH_P, PG_RETURN_JSONB_P, and PG_RETURN_NULL.
Referenced by jsonb_path_query_first(), and jsonb_path_query_first_tz().
Datum jsonb_path_query_first_tz | ( | PG_FUNCTION_ARGS | ) |
Definition at line 513 of file jsonpath_exec.c.
References jsonb_path_query_first_internal().
|
static |
Definition at line 396 of file jsonpath_exec.c.
References executeJsonPath(), JsonbPGetDatum(), JsonbValueToJsonb(), JsonValueListGetList(), lfirst, list_delete_first(), list_head(), MemoryContextSwitchTo(), FuncCallContext::multi_call_memory_ctx, PG_GETARG_BOOL, PG_GETARG_JSONB_P_COPY, PG_GETARG_JSONPATH_P_COPY, SRF_FIRSTCALL_INIT, SRF_IS_FIRSTCALL, SRF_PERCALL_SETUP, SRF_RETURN_DONE, SRF_RETURN_NEXT, and FuncCallContext::user_fctx.
Referenced by jsonb_path_query(), and jsonb_path_query_tz().
Datum jsonb_path_query_tz | ( | PG_FUNCTION_ARGS | ) |
Definition at line 448 of file jsonpath_exec.c.
References jsonb_path_query_internal().
|
static |
Definition at line 2158 of file jsonpath_exec.c.
References Assert(), jbvArray, jbvBinary, JsonContainerIsArray, JsonContainerIsScalar, JsonContainerSize, JsonbValue::type, and JsonbValue::val.
Referenced by executeItemOptUnwrapTarget().
|
static |
Definition at line 2527 of file jsonpath_exec.c.
References jbvBinary, Jsonb::root, JsonbValue::type, JsonbValue::val, and VARSIZE_ANY_EXHDR.
Referenced by executeJsonPath(), executeKeyValueMethod(), and getJsonPathVariable().
|
static |
Definition at line 2540 of file jsonpath_exec.c.
References Assert(), elog(), ERROR, JsonbContainer::header, jbvArray, jbvBinary, jbvObject, JsonContainerIsArray, JsonContainerIsObject, JsonContainerIsScalar, generate_unaccent_rules::type, JsonbValue::type, and JsonbValue::val.
Referenced by executeItemOptUnwrapResult(), executeItemOptUnwrapTarget(), executeKeyValueMethod(), and executeNumericItemMethod().
|
static |
Definition at line 2439 of file jsonpath_exec.c.
References lappend(), JsonValueList::list, list_make2, and JsonValueList::singleton.
Referenced by executeAnyItem(), executeItemOptUnwrapResult(), and executeNextItem().
|
static |
Definition at line 2471 of file jsonpath_exec.c.
References JsonValueList::list, list_make1, and JsonValueList::singleton.
Referenced by jsonb_path_query_internal().
|
static |
Definition at line 2465 of file jsonpath_exec.c.
References linitial, JsonValueList::list, and JsonValueList::singleton.
Referenced by executeBinaryArithmExpr(), getArrayIndex(), jsonb_path_match_internal(), and jsonb_path_query_first_internal().
|
static |
Definition at line 2480 of file jsonpath_exec.c.
References linitial, JsonValueList::list, JsonValueListIterator::list, list_second_cell(), JsonValueListIterator::next, NIL, JsonValueList::singleton, and JsonValueListIterator::value.
Referenced by executeItemOptUnwrapResult(), executePredicate(), executeUnaryArithmExpr(), and wrapItemsInArray().
|
static |
Definition at line 2459 of file jsonpath_exec.c.
References JsonValueList::list, NIL, and JsonValueList::singleton.
Referenced by executeBoolItem(), and executeJsonPath().
|
static |
Definition at line 2453 of file jsonpath_exec.c.
References JsonValueList::list, list_length(), and JsonValueList::singleton.
Referenced by executeBinaryArithmExpr(), getArrayIndex(), jsonb_path_match_internal(), and jsonb_path_query_first_internal().
|
static |
Definition at line 2506 of file jsonpath_exec.c.
References lfirst, JsonValueListIterator::list, lnext(), JsonValueListIterator::next, and JsonValueListIterator::value.
Referenced by executeItemOptUnwrapResult(), executePredicate(), executeUnaryArithmExpr(), and wrapItemsInArray().
|
static |
Definition at line 2427 of file jsonpath_exec.c.
References JsonPathExecContext::baseObject, JsonBaseObjectInfo::id, JsonBaseObjectInfo::jbc, jbvBinary, JsonbValue::type, and JsonbValue::val.
Referenced by executeItemOptUnwrapTarget(), executeKeyValueMethod(), and getJsonPathVariable().
|
static |
Definition at line 2575 of file jsonpath_exec.c.
References JsonValueListInitIterator(), JsonValueListNext(), ps, pushJsonbValue(), WJB_BEGIN_ARRAY, WJB_ELEM, and WJB_END_ARRAY.
Referenced by jsonb_path_query_array_internal().