137 #define jperIsError(jper) ((jper) == jperError)
156 #define jspStrictAbsenseOfErrors(cxt) (!(cxt)->laxMode)
157 #define jspAutoUnwrap(cxt) ((cxt)->laxMode)
158 #define jspAutoWrap(cxt) ((cxt)->laxMode)
159 #define jspIgnoreStructuralErrors(cxt) ((cxt)->ignoreStructuralErrors)
160 #define jspThrowErrors(cxt) ((cxt)->throwErrors)
163 #define RETURN_ERROR(throw_error) \
165 if (jspThrowErrors(cxt)) \
178 Jsonb *json,
bool throwErrors,
202 bool ignoreStructuralErrors,
bool unwrapNext);
256 bool useTz,
bool *cast_error);
360 (
errcode(ERRCODE_SINGLETON_SQL_JSON_ITEM_REQUIRED),
361 errmsg(
"single boolean result is expected")));
556 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
557 errmsg(
"\"vars\" argument is not an object"),
558 errdetail(
"Jsonpath parameters should be encoded as key-value pairs of \"vars\" object.")));
674 (
errcode(ERRCODE_SQL_JSON_MEMBER_NOT_FOUND), \
675 errmsg(
"JSON object does not contain key \"%s\"",
677 key.val.string.len))));
686 (
errcode(ERRCODE_SQL_JSON_MEMBER_NOT_FOUND),
687 errmsg(
"jsonpath member accessor can only be applied to an object"))));
715 (
errcode(ERRCODE_SQL_JSON_ARRAY_NOT_FOUND),
716 errmsg(
"jsonpath wildcard array accessor can only be applied to an array"))));
725 bool singleton = size < 0;
756 index_to = index_from;
760 index_from > index_to ||
763 (
errcode(ERRCODE_INVALID_SQL_JSON_SUBSCRIPT),
764 errmsg(
"jsonpath array subscript is out of bounds"))));
769 if (index_to >= size)
795 if (!hasNext && !found)
820 (
errcode(ERRCODE_SQL_JSON_ARRAY_NOT_FOUND),
821 errmsg(
"jsonpath array accessor can only be applied to an array"))));
833 elog(
ERROR,
"evaluating jsonpath LAST outside of array subscript");
835 if (!hasNext && !found)
843 lastjbv = hasNext ? &tmpjbv :
palloc(
sizeof(*lastjbv));
849 lastjbv, found, hasNext);
862 (cxt, hasNext ? &elem : NULL,
863 jb->
val.binary.data, found, 1, 1, 1,
872 (
errcode(ERRCODE_SQL_JSON_OBJECT_NOT_FOUND),
873 errmsg(
"jsonpath wildcard member accessor can only be applied to an object"))));
929 bool savedIgnoreStructuralErrors;
943 (cxt, hasNext ? &elem : NULL,
944 jb->
val.binary.data, found,
972 v = hasNext ? &vbuf :
palloc(
sizeof(*v));
989 jbv->
val.string.len = strlen(jbv->
val.string.val);
1006 (
errcode(ERRCODE_SQL_JSON_ARRAY_NOT_FOUND),
1007 errmsg(
"jsonpath item method .%s() can only be applied to an array",
1015 jb =
palloc(
sizeof(*jb));
1055 (
Node *) &escontext);
1059 (
errcode(ERRCODE_NON_NUMERIC_SQL_JSON_ITEM),
1060 errmsg(
"numeric argument of jsonpath item method .%s() is out of range for type double precision",
1069 jb->
val.string.len);
1076 (
Node *) &escontext);
1080 (
errcode(ERRCODE_NON_NUMERIC_SQL_JSON_ITEM),
1081 errmsg(
"string argument of jsonpath item method .%s() is not a valid representation of a double precision number",
1093 (
errcode(ERRCODE_NON_NUMERIC_SQL_JSON_ITEM),
1094 errmsg(
"jsonpath item method .%s() can only be applied to a string or numeric value",
1114 elog(
ERROR,
"unrecognized jsonpath item type: %d", jsp->
type);
1126 bool unwrapElements)
1131 elog(
ERROR,
"invalid jsonb array value type: %d", jb->
type);
1135 (cxt, jsp, jb->
val.binary.data, found, 1, 1, 1,
1136 false, unwrapElements);
1152 hasNext =
next != NULL;
1236 elog(
ERROR,
"boolean jsonpath item cannot have next item");
1350 elog(
ERROR,
"invalid boolean jsonpath item type: %d", jsp->
type);
1383 bool ignoreStructuralErrors,
bool unwrapNext)
1411 if (level >= first ||
1418 if (ignoreStructuralErrors)
1420 bool savedIgnoreStructuralErrors;
1445 (cxt, jsp, v.
val.binary.data, found,
1446 level + 1, first, last,
1447 ignoreStructuralErrors, unwrapNext);
1494 unwrapRightArg, &rseq);
1513 while (rarg ? (rval != NULL) : first)
1583 (
errcode(ERRCODE_SINGLETON_SQL_JSON_ITEM_REQUIRED),
1584 errmsg(
"left operand of jsonpath operator %s is not a single numeric value",
1590 (
errcode(ERRCODE_SINGLETON_SQL_JSON_ITEM_REQUIRED),
1591 errmsg(
"right operand of jsonpath operator %s is not a single numeric value",
1596 res = func(lval->
val.numeric, rval->
val.numeric, NULL);
1611 lval =
palloc(
sizeof(*lval));
1649 if (!found && !hasNext)
1654 if (!found && !hasNext)
1658 (
errcode(ERRCODE_SQL_JSON_NUMBER_NOT_FOUND),
1659 errmsg(
"operand of unary jsonpath operator %s is not a numeric value",
1699 if (whole->
val.string.len >= initial->
val.string.len &&
1700 !memcmp(whole->
val.string.val,
1701 initial->
val.string.val,
1702 initial->
val.string.len))
1733 str->val.string.len,
1734 cxt->
cflags, DEFAULT_COLLATION_OID, 0, NULL))
1757 (
errcode(ERRCODE_NON_NUMERIC_SQL_JSON_ITEM),
1758 errmsg(
"jsonpath item method .%s() can only be applied to a numeric value",
1766 jb =
palloc(
sizeof(*jb));
1797 (
errcode(ERRCODE_INVALID_ARGUMENT_FOR_SQL_JSON_DATETIME_FUNCTION),
1798 errmsg(
"jsonpath item method .%s() can only be applied to a string",
1802 jb->
val.string.len);
1809 collid = DEFAULT_COLLATION_OID;
1821 elog(
ERROR,
"invalid jsonpath item type for .datetime() argument");
1829 &typid, &typmod, &tz,
1846 static const char *fmt_str[] =
1849 "HH24:MI:SS.USTZH:TZM",
1851 "HH24:MI:SSTZH:TZM",
1855 "yyyy-mm-dd HH24:MI:SS.USTZH:TZM",
1856 "yyyy-mm-dd HH24:MI:SS.USTZH",
1857 "yyyy-mm-dd HH24:MI:SSTZH:TZM",
1858 "yyyy-mm-dd HH24:MI:SSTZH",
1859 "yyyy-mm-dd\"T\"HH24:MI:SS.USTZH:TZM",
1860 "yyyy-mm-dd\"T\"HH24:MI:SS.USTZH",
1861 "yyyy-mm-dd\"T\"HH24:MI:SSTZH:TZM",
1862 "yyyy-mm-dd\"T\"HH24:MI:SSTZH",
1863 "yyyy-mm-dd HH24:MI:SS.US",
1864 "yyyy-mm-dd HH24:MI:SS",
1865 "yyyy-mm-dd\"T\"HH24:MI:SS.US",
1866 "yyyy-mm-dd\"T\"HH24:MI:SS"
1888 &typid, &typmod, &tz,
1889 (
Node *) &escontext);
1900 (
errcode(ERRCODE_INVALID_ARGUMENT_FOR_SQL_JSON_DATETIME_FUNCTION),
1901 errmsg(
"datetime format is not recognized: \"%s\"",
1903 errhint(
"Use a datetime template argument to specify the input data format."))));
1913 if (!hasNext && !found)
1916 jb = hasNext ? &jbvbuf :
palloc(
sizeof(*jb));
1920 jb->
val.datetime.typid = typid;
1921 jb->
val.datetime.typmod = typmod;
1922 jb->
val.datetime.tz = tz;
1970 (
errcode(ERRCODE_SQL_JSON_OBJECT_NOT_FOUND),
1971 errmsg(
"jsonpath item method .%s() can only be applied to an object",
1974 jbc = jb->
val.binary.data;
1982 keystr.
val.string.val =
"key";
1983 keystr.
val.string.len = 3;
1986 valstr.
val.string.val =
"value";
1987 valstr.
val.string.len = 5;
1990 idstr.
val.string.val =
"id";
1991 idstr.
val.string.len = 2;
1996 id += (int64) cxt->
baseObject.
id * INT64CONST(10000000000);
2016 if (!hasNext && !found)
2108 &
value->val.string.len);
2114 elog(
ERROR,
"unexpected jsonpath item type");
2139 tmp.
val.string.val = varName;
2140 tmp.
val.string.len = varNameLength;
2152 (
errcode(ERRCODE_UNDEFINED_OBJECT),
2153 errmsg(
"could not find jsonpath variable \"%s\"",
2154 pnstrdup(varName, varNameLength))));
2196 const char *
s2,
int len2)
2208 return len1 < len2 ? -1 : 1;
2217 const char *mbstr2,
int mblen2)
2245 utf8len1 = (mbstr1 == utf8str1) ? mblen1 : strlen(utf8str1);
2246 utf8len2 = (mbstr2 == utf8str2) ? mblen2 : strlen(utf8str2);
2254 if (mbstr1 == utf8str1 && mbstr2 == utf8str2)
2258 if (mbstr1 != utf8str1)
2260 if (mbstr2 != utf8str2)
2308 cmp = jb1->
val.boolean == jb2->
val.boolean ? 0 :
2309 jb1->
val.boolean ? 1 : -1;
2316 return jb1->
val.string.len != jb2->
val.string.len ||
2317 memcmp(jb1->
val.string.val,
2318 jb2->
val.string.val,
2322 jb2->
val.string.val, jb2->
val.string.len);
2329 jb1->
val.datetime.typid,
2330 jb2->
val.datetime.value,
2331 jb2->
val.datetime.typid,
2370 elog(
ERROR,
"unrecognized jsonpath operation: %d", op);
2407 Datum numeric_index;
2408 bool have_error =
false;
2416 (
errcode(ERRCODE_INVALID_SQL_JSON_SUBSCRIPT),
2417 errmsg(
"jsonpath array subscript is not a single numeric value"))));
2428 (
errcode(ERRCODE_INVALID_SQL_JSON_SUBSCRIPT),
2429 errmsg(
"jsonpath array subscript is out of integer range"))));
2455 else if (!jvl->
list)
2539 jbv->
val.binary.data = &jb->
root;
2579 return scalar->
type ==
type ? scalar : NULL;
2605 (
errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
2606 errmsg(
"cannot convert value from %s to %s without time zone usage",
2608 errhint(
"Use *_tz() function for time zone support.")));
2659 bool useTz,
bool *cast_error)
2663 *cast_error =
false;
2680 case TIMESTAMPTZOID:
2691 elog(
ERROR,
"unrecognized SQL/JSON datetime type oid: %u",
2712 case TIMESTAMPTZOID:
2717 elog(
ERROR,
"unrecognized SQL/JSON datetime type oid: %u",
2738 case TIMESTAMPTZOID:
2743 elog(
ERROR,
"unrecognized SQL/JSON datetime type oid: %u",
2761 case TIMESTAMPTZOID:
2772 elog(
ERROR,
"unrecognized SQL/JSON datetime type oid: %u",
2777 case TIMESTAMPTZOID:
2790 case TIMESTAMPTZOID:
2801 elog(
ERROR,
"unrecognized SQL/JSON datetime type oid: %u",
2807 elog(
ERROR,
"unrecognized SQL/JSON datetime type oid: %u", typid1);
int32 numeric_int4_opt_error(Numeric num, bool *have_error)
Datum float8_numeric(PG_FUNCTION_ARGS)
Datum numeric_cmp(PG_FUNCTION_ARGS)
Numeric numeric_mod_opt_error(Numeric num1, Numeric num2, bool *have_error)
Numeric numeric_div_opt_error(Numeric num1, Numeric num2, bool *have_error)
Numeric int64_to_numeric(int64 val)
Datum numeric_uminus(PG_FUNCTION_ARGS)
Datum numeric_ceil(PG_FUNCTION_ARGS)
Datum numeric_out(PG_FUNCTION_ARGS)
Datum numeric_trunc(PG_FUNCTION_ARGS)
Numeric numeric_sub_opt_error(Numeric num1, Numeric num2, bool *have_error)
Numeric numeric_mul_opt_error(Numeric num1, Numeric num2, bool *have_error)
Datum numeric_abs(PG_FUNCTION_ARGS)
Numeric numeric_add_opt_error(Numeric num1, Numeric num2, bool *have_error)
Datum numeric_floor(PG_FUNCTION_ARGS)
Datum timestamp_cmp(PG_FUNCTION_ARGS)
int32 timestamp_cmp_timestamptz_internal(Timestamp timestampVal, TimestampTz dt2)
int32 date_cmp_timestamp_internal(DateADT dateVal, Timestamp dt2)
Datum date_cmp(PG_FUNCTION_ARGS)
Datum time_cmp(PG_FUNCTION_ARGS)
Datum timetz_cmp(PG_FUNCTION_ARGS)
Datum time_timetz(PG_FUNCTION_ARGS)
int32 date_cmp_timestamptz_internal(DateADT dateVal, TimestampTz dt2)
static DateADT DatumGetDateADT(Datum X)
static void PGresult * res
elog(ERROR, "%s: %s", p2, msg)
int errdetail(const char *fmt,...)
int errhint(const char *fmt,...)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
float8 float8in_internal(char *num, char **endptr_p, const char *type_name, const char *orig_string, struct Node *escontext)
Datum Float8GetDatum(float8 X)
#define PG_FREE_IF_COPY(ptr, n)
#define DirectFunctionCall2(func, arg1, arg2)
#define DirectFunctionCall1(func, arg1)
#define PG_GETARG_BOOL(n)
Datum(* PGFunction)(FunctionCallInfo fcinfo)
#define PG_RETURN_BOOL(x)
#define SRF_IS_FIRSTCALL()
#define SRF_PERCALL_SETUP()
#define SRF_RETURN_NEXT(_funcctx, _result)
#define SRF_FIRSTCALL_INIT()
#define SRF_RETURN_DONE(_funcctx)
const char * JsonbTypeName(JsonbValue *val)
bool JsonbExtractScalar(JsonbContainer *jbc, JsonbValue *res)
#define JsonContainerIsScalar(jc)
#define JsonContainerIsArray(jc)
#define JsonContainerSize(jc)
#define PG_GETARG_JSONB_P_COPY(x)
static Datum JsonbPGetDatum(const Jsonb *p)
#define PG_RETURN_JSONB_P(x)
#define PG_GETARG_JSONB_P(x)
#define JsonContainerIsObject(jc)
JsonbIterator * JsonbIteratorInit(JsonbContainer *container)
Jsonb * JsonbValueToJsonb(JsonbValue *val)
JsonbValue * getIthJsonbValueFromContainer(JsonbContainer *container, uint32 i)
JsonbIteratorToken JsonbIteratorNext(JsonbIterator **it, JsonbValue *val, bool skipNested)
JsonbValue * pushJsonbValue(JsonbParseState **pstate, JsonbIteratorToken seq, JsonbValue *jbval)
JsonbValue * findJsonbValueFromContainer(JsonbContainer *container, uint32 flags, JsonbValue *key)
void jspGetLeftArg(JsonPathItem *v, JsonPathItem *a)
void jspGetArg(JsonPathItem *v, JsonPathItem *a)
void jspInitByBuffer(JsonPathItem *v, char *base, int32 pos)
bool jspGetBool(JsonPathItem *v)
void jspInit(JsonPathItem *v, JsonPath *js)
const char * jspOperationName(JsonPathItemType type)
Numeric jspGetNumeric(JsonPathItem *v)
bool jspGetArraySubscript(JsonPathItem *v, JsonPathItem *from, JsonPathItem *to, int i)
bool jspGetNext(JsonPathItem *v, JsonPathItem *a)
void jspGetRightArg(JsonPathItem *v, JsonPathItem *a)
char * jspGetString(JsonPathItem *v, int32 *len)
bool jspConvertRegexFlags(uint32 xflags, int *result, struct Node *escontext)
#define PG_GETARG_JSONPATH_P(x)
#define PG_GETARG_JSONPATH_P_COPY(x)
static JsonPathBool executeComparison(JsonPathItem *cmp, JsonbValue *lv, JsonbValue *rv, void *p)
static Datum jsonb_path_query_first_internal(FunctionCallInfo fcinfo, bool tz)
static JsonPathExecResult executeItemOptUnwrapTarget(JsonPathExecContext *cxt, JsonPathItem *jsp, JsonbValue *jb, JsonValueList *found, bool unwrap)
Datum jsonb_path_query_tz(PG_FUNCTION_ARGS)
#define jspAutoUnwrap(cxt)
Datum jsonb_path_exists_opr(PG_FUNCTION_ARGS)
static int cmpDateToTimestamp(DateADT date1, Timestamp ts2, bool useTz)
static JsonPathBool executeBoolItem(JsonPathExecContext *cxt, JsonPathItem *jsp, JsonbValue *jb, bool canHaveNext)
static int JsonbArraySize(JsonbValue *jb)
struct JsonBaseObjectInfo JsonBaseObjectInfo
Numeric(* BinaryArithmFunc)(Numeric num1, Numeric num2, bool *error)
static List * JsonValueListGetList(JsonValueList *jvl)
struct JsonValueList JsonValueList
static int compareStrings(const char *mbstr1, int mblen1, const char *mbstr2, int mblen2)
static JsonPathExecResult appendBoolResult(JsonPathExecContext *cxt, JsonPathItem *jsp, JsonValueList *found, JsonPathBool res)
static JsonPathExecResult executeJsonPath(JsonPath *path, Jsonb *vars, Jsonb *json, bool throwErrors, JsonValueList *result, bool useTz)
Datum jsonb_path_query_first(PG_FUNCTION_ARGS)
static Datum jsonb_path_query_array_internal(FunctionCallInfo fcinfo, bool tz)
static JsonPathExecResult executeBinaryArithmExpr(JsonPathExecContext *cxt, JsonPathItem *jsp, JsonbValue *jb, BinaryArithmFunc func, JsonValueList *found)
static void getJsonPathVariable(JsonPathExecContext *cxt, JsonPathItem *variable, Jsonb *vars, JsonbValue *value)
static Datum jsonb_path_query_internal(FunctionCallInfo fcinfo, bool tz)
#define RETURN_ERROR(throw_error)
static JsonPathExecResult executeItemOptUnwrapResultNoThrow(JsonPathExecContext *cxt, JsonPathItem *jsp, JsonbValue *jb, bool unwrap, JsonValueList *found)
static JsonPathExecResult executeAnyItem(JsonPathExecContext *cxt, JsonPathItem *jsp, JsonbContainer *jbc, JsonValueList *found, uint32 level, uint32 first, uint32 last, bool ignoreStructuralErrors, bool unwrapNext)
static JsonPathExecResult executeKeyValueMethod(JsonPathExecContext *cxt, JsonPathItem *jsp, JsonbValue *jb, JsonValueList *found)
static JsonPathBool executeStartsWith(JsonPathItem *jsp, JsonbValue *whole, JsonbValue *initial, void *param)
static Datum jsonb_path_match_internal(FunctionCallInfo fcinfo, bool tz)
static JsonBaseObjectInfo setBaseObject(JsonPathExecContext *cxt, JsonbValue *jbv, int32 id)
static Datum castTimeToTimeTz(Datum time, bool useTz)
static void JsonValueListAppend(JsonValueList *jvl, JsonbValue *jbv)
static JsonPathExecResult executeUnaryArithmExpr(JsonPathExecContext *cxt, JsonPathItem *jsp, JsonbValue *jb, PGFunction func, JsonValueList *found)
static int JsonbType(JsonbValue *jb)
static JsonPathExecResult executeDateTimeMethod(JsonPathExecContext *cxt, JsonPathItem *jsp, JsonbValue *jb, JsonValueList *found)
static JsonbValue * getScalar(JsonbValue *scalar, enum jbvType type)
struct JsonPathExecContext JsonPathExecContext
Datum jsonb_path_match_tz(PG_FUNCTION_ARGS)
#define jspStrictAbsenseOfErrors(cxt)
static JsonPathExecResult executeItem(JsonPathExecContext *cxt, JsonPathItem *jsp, JsonbValue *jb, JsonValueList *found)
Datum jsonb_path_query(PG_FUNCTION_ARGS)
Datum jsonb_path_match_opr(PG_FUNCTION_ARGS)
JsonPathBool(* JsonPathPredicateCallback)(JsonPathItem *jsp, JsonbValue *larg, JsonbValue *rarg, void *param)
static void JsonValueListInitIterator(const JsonValueList *jvl, JsonValueListIterator *it)
static JsonPathBool executeNestedBoolItem(JsonPathExecContext *cxt, JsonPathItem *jsp, JsonbValue *jb)
static int compareDatetime(Datum val1, Oid typid1, Datum val2, Oid typid2, bool useTz, bool *cast_error)
static int cmpDateToTimestampTz(DateADT date1, TimestampTz tstz2, bool useTz)
Datum jsonb_path_match(PG_FUNCTION_ARGS)
static JsonbValue * wrapItemsInArray(const JsonValueList *items)
static JsonbValue * JsonValueListNext(const JsonValueList *jvl, JsonValueListIterator *it)
static JsonPathExecResult executeNextItem(JsonPathExecContext *cxt, JsonPathItem *cur, JsonPathItem *next, JsonbValue *v, JsonValueList *found, bool copy)
Datum jsonb_path_exists(PG_FUNCTION_ARGS)
#define jperIsError(jper)
static Datum jsonb_path_exists_internal(FunctionCallInfo fcinfo, bool tz)
struct JsonValueListIterator JsonValueListIterator
Datum jsonb_path_query_array_tz(PG_FUNCTION_ARGS)
static JsonPathExecResult executeItemUnwrapTargetArray(JsonPathExecContext *cxt, JsonPathItem *jsp, JsonbValue *jb, JsonValueList *found, bool unwrapElements)
static int cmpTimestampToTimestampTz(Timestamp ts1, TimestampTz tstz2, bool useTz)
static JsonPathBool executeLikeRegex(JsonPathItem *jsp, JsonbValue *str, JsonbValue *rarg, void *param)
static int JsonValueListLength(const JsonValueList *jvl)
static bool JsonValueListIsEmpty(JsonValueList *jvl)
#define jspIgnoreStructuralErrors(cxt)
struct JsonLikeRegexContext JsonLikeRegexContext
static int compareNumeric(Numeric a, Numeric b)
static JsonPathBool compareItems(int32 op, JsonbValue *jb1, JsonbValue *jb2, bool useTz)
static JsonPathExecResult getArrayIndex(JsonPathExecContext *cxt, JsonPathItem *jsp, JsonbValue *jb, int32 *index)
Datum jsonb_path_query_first_tz(PG_FUNCTION_ARGS)
Datum jsonb_path_query_array(PG_FUNCTION_ARGS)
static JsonPathExecResult executeItemOptUnwrapResult(JsonPathExecContext *cxt, JsonPathItem *jsp, JsonbValue *jb, bool unwrap, JsonValueList *found)
static JsonPathExecResult executeNumericItemMethod(JsonPathExecContext *cxt, JsonPathItem *jsp, JsonbValue *jb, bool unwrap, PGFunction func, JsonValueList *found)
static JsonbValue * JsonValueListHead(JsonValueList *jvl)
Datum jsonb_path_exists_tz(PG_FUNCTION_ARGS)
static void getJsonPathItem(JsonPathExecContext *cxt, JsonPathItem *item, JsonbValue *value)
static JsonPathBool executePredicate(JsonPathExecContext *cxt, JsonPathItem *pred, JsonPathItem *larg, JsonPathItem *rarg, JsonbValue *jb, bool unwrapRightArg, JsonPathPredicateCallback exec, void *param)
static int binaryCompareStrings(const char *s1, int len1, const char *s2, int len2)
static JsonbValue * JsonbInitBinary(JsonbValue *jbv, Jsonb *jb)
static void checkTimezoneIsUsedForCast(bool useTz, const char *type1, const char *type2)
#define jspThrowErrors(cxt)
static JsonbValue * copyJsonbValue(JsonbValue *src)
Assert(fmt[strlen(fmt) - 1] !='\n')
List * lappend(List *list, void *datum)
List * list_delete_first(List *list)
int GetDatabaseEncoding(void)
char * pg_server_to_any(const char *s, int len, int encoding)
char * pnstrdup(const char *in, Size len)
char * pstrdup(const char *in)
void pfree(void *pointer)
MemoryContext TopMemoryContext
#define CHECK_FOR_INTERRUPTS()
static Numeric DatumGetNumeric(Datum X)
struct NumericData * Numeric
static Datum NumericGetDatum(Numeric X)
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
static int list_length(const List *l)
static ListCell * list_head(const List *l)
static ListCell * lnext(const List *l, const ListCell *c)
#define list_make2(x1, x2)
static ListCell * list_second_cell(const List *l)
void check_stack_depth(void)
static char * DatumGetCString(Datum X)
static Datum Int32GetDatum(int32 X)
static int32 DatumGetInt32(Datum X)
static struct cvec * range(struct vars *v, chr a, chr b, int cases)
static int cmp(const chr *x, const chr *y, size_t len)
bool RE_compile_and_execute(text *text_re, char *dat, int dat_len, int cflags, Oid collation, int nmatch, regmatch_t *pmatch)
MemoryContext multi_call_memory_ctx
bool ignoreStructuralErrors
int lastGeneratedObjectId
JsonBaseObjectInfo baseObject
struct JsonPathItem::@131::@134 anybounds
struct JsonPathItem::@131::@136 like_regex
struct JsonPathItem::@131::@133 array
union JsonPathItem::@131 content
static Timestamp DatumGetTimestamp(Datum X)
static TimestampTz DatumGetTimestampTz(Datum X)
#define VARSIZE_ANY_EXHDR(PTR)
char * text_to_cstring(const text *t)
text * cstring_to_text_with_len(const char *s, int len)
text * cstring_to_text(const char *s)