Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2aeacb9

Browse filesBrowse files
committed
Correct fallback if not positive quals for vodka opclass.
1 parent 1c16053 commit 2aeacb9
Copy full SHA for 2aeacb9

File tree

1 file changed

+12
-5
lines changed
Filter options

1 file changed

+12
-5
lines changed

‎jsonb_vodka_ops.c

Copy file name to clipboardExpand all lines: jsonb_vodka_ops.c
+12-5Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -427,11 +427,18 @@ vodkaqueryjsonbextract(PG_FUNCTION_ARGS)
427427
case JsQueryMatchStrategyNumber:
428428
jq = PG_GETARG_JSQUERY(0);
429429
root = extractJsQuery(jq, make_entry_handler, (Pointer)&e);
430-
431-
*nentries = e.count;
432-
keys = e.entries;
433-
for (i = 0; i < e.count; i++)
434-
keys[i].extra = (Pointer)root;
430+
if (root)
431+
{
432+
*nentries = e.count;
433+
keys = e.entries;
434+
for (i = 0; i < e.count; i++)
435+
keys[i].extra = (Pointer)root;
436+
}
437+
else
438+
{
439+
*nentries = 0;
440+
keys = NULL;
441+
}
435442
break;
436443

437444
default:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.