Skip to content

Navigation Menu

Sign in
Appearance settings

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 832649c

Browse filesBrowse files
committed
Fix '= *' and '$'.
1 parent 88b0e84 commit 832649c
Copy full SHA for 832649c

File tree

2 files changed

+15
-2
lines changed
Filter options

2 files changed

+15
-2
lines changed

‎jsonb_gin_ops.c

Copy file name to clipboardExpand all lines: jsonb_gin_ops.c
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,8 @@ make_bloom_entry_handler(ExtractedNode *node, Pointer extra)
343343

344344
if (!node->bounds.inequality)
345345
{
346+
if (node->bounds.exact->type == jqiAny)
347+
return -1;
346348
key = make_gin_query_key(node->bounds.exact, lossy ? 0 : hash);
347349
}
348350
else
@@ -824,6 +826,8 @@ make_hash_entry_handler(ExtractedNode *node, Pointer extra)
824826

825827
if (!node->bounds.inequality)
826828
{
829+
if (node->bounds.exact->type == jqiAny)
830+
return -1;
827831
key = make_gin_query_key(node->bounds.exact, hash);
828832
}
829833
else

‎jsquery_extract.c

Copy file name to clipboardExpand all lines: jsquery_extract.c
+11-2Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ recursiveExtract(char *jqBase, int32 jqPos, bool indirect, PathItem *path)
109109
pathItem->type = iAnyArray;
110110
pathItem->parent = path;
111111
return recursiveExtract(jqBase, nextPos, true, pathItem);
112+
case jqiCurrent:
113+
return recursiveExtract(jqBase, nextPos, indirect, path);
112114
case jqiEqual:
113115
read_int32(arg, jqBase, jqPos);
114116
result = (ExtractedNode *)palloc(sizeof(ExtractedNode));
@@ -407,8 +409,15 @@ processGroup(ExtractedNode *node, int start, int end)
407409

408410
if (!child->bounds.inequality)
409411
{
410-
exact = child->bounds.exact;
411-
break;
412+
if (child->bounds.exact->type == jqiAny)
413+
{
414+
continue;
415+
}
416+
else
417+
{
418+
exact = child->bounds.exact;
419+
break;
420+
}
412421
}
413422

414423
if (child->bounds.leftBound)

0 commit comments

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