int cflags;
} JsonLikeRegexContext;
-#define EmptyJsonLikeRegexContext {NULL, 0}
-
/* Result of jsonpath predicate evaluation */
typedef enum JsonPathBool
{
List *list;
} JsonValueList;
-#define EmptyJsonValueList {NULL, NIL}
-
typedef struct JsonValueListIterator
{
JsonbValue *value;
Jsonb *jb = PG_GETARG_JSONB_P(0);
JsonPath *jp = PG_GETARG_JSONPATH_P(1);
JsonbValue *jbv;
- JsonValueList found = EmptyJsonValueList;
+ JsonValueList found = {0};
Jsonb *vars = NULL;
bool silent = true;
MemoryContext oldcontext;
Jsonb *vars;
bool silent;
- JsonValueList found = EmptyJsonValueList;
+ JsonValueList found = {0};
funcctx = SRF_FIRSTCALL_INIT();
oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
{
Jsonb *jb = PG_GETARG_JSONB_P(0);
JsonPath *jp = PG_GETARG_JSONPATH_P(1);
- JsonValueList found = EmptyJsonValueList;
+ JsonValueList found = {0};
Jsonb *vars = PG_GETARG_JSONB_P(2);
bool silent = PG_GETARG_BOOL(3);
{
Jsonb *jb = PG_GETARG_JSONB_P(0);
JsonPath *jp = PG_GETARG_JSONPATH_P(1);
- JsonValueList found = EmptyJsonValueList;
+ JsonValueList found = {0};
Jsonb *vars = PG_GETARG_JSONB_P(2);
bool silent = PG_GETARG_BOOL(3);
* In strict mode we must get a complete list of values to check that
* there are no errors at all.
*/
- JsonValueList vals = EmptyJsonValueList;
+ JsonValueList vals = {0};
res = executeItem(&cxt, &jsp, &jbv, &vals);
{
if (unwrap && jspAutoUnwrap(cxt))
{
- JsonValueList seq = EmptyJsonValueList;
+ JsonValueList seq = {0};
JsonValueListIterator it;
JsonPathExecResult res = executeItem(cxt, jsp, jb, &seq);
JsonbValue *item;
* regexes, but we use Postgres regexes here. 'flags' is a
* string literal converted to integer flags at compile-time.
*/
- JsonLikeRegexContext lrcxt = EmptyJsonLikeRegexContext;
+ JsonLikeRegexContext lrcxt = {0};
jspInitByBuffer(&larg, jsp->base,
jsp->content.like_regex.expr);
* In strict mode we must get a complete list of values to
* check that there are no errors at all.
*/
- JsonValueList vals = EmptyJsonValueList;
+ JsonValueList vals = {0};
JsonPathExecResult res =
executeItemOptUnwrapResultNoThrow(cxt, &larg, jb,
false, &vals);
{
JsonPathExecResult res;
JsonValueListIterator lseqit;
- JsonValueList lseq = EmptyJsonValueList;
- JsonValueList rseq = EmptyJsonValueList;
+ JsonValueList lseq = {0};
+ JsonValueList rseq = {0};
JsonbValue *lval;
bool error = false;
bool found = false;
{
JsonPathExecResult jper;
JsonPathItem elem;
- JsonValueList lseq = EmptyJsonValueList;
- JsonValueList rseq = EmptyJsonValueList;
+ JsonValueList lseq = {0};
+ JsonValueList rseq = {0};
JsonbValue *lval;
JsonbValue *rval;
Numeric res;
JsonPathExecResult jper;
JsonPathExecResult jper2;
JsonPathItem elem;
- JsonValueList seq = EmptyJsonValueList;
+ JsonValueList seq = {0};
JsonValueListIterator it;
JsonbValue *val;
bool hasNext;
int32 *index)
{
JsonbValue *jbv;
- JsonValueList found = EmptyJsonValueList;
+ JsonValueList found = {0};
JsonPathExecResult res = executeItem(cxt, jsp, jb, &found);
Datum numeric_index;
bool have_error = false;