Content-Length: 268197 | pFad | http://github.com/postgrespro/postgres/commit/06a66d87dbc7e06581af6765131ea250063fb4ac

5C Clean up a bug in sql/json items commit 66ea94e8e6 · postgrespro/postgres@06a66d8 · GitHub
Skip to content

Commit 06a66d8

Browse files
committed
Clean up a bug in sql/json items commit 66ea94e
Remove a buggy and unnecessary test, along with an unnecessary pstrdup() and a line of dead code. Per report, diagnosis and fix from Tom Lane Discussion: https://postgr.es/m/439811.1706211069@sss.pgh.pa.us
1 parent 7014c9a commit 06a66d8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/backend/utils/adt/jsonpath_exec.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1540,11 +1540,9 @@ executeItemOptUnwrapTarget(JsonPathExecContext *cxt, JsonPathItem *jsp,
15401540
break;
15411541
}
15421542

1543-
res = jperOk;
1544-
15451543
jb = &jbv;
15461544
Assert(tmp != NULL); /* We must have set tmp above */
1547-
jb->val.string.val = (jb->type == jbvString) ? tmp : pstrdup(tmp);
1545+
jb->val.string.val = tmp;
15481546
jb->val.string.len = strlen(jb->val.string.val);
15491547
jb->type = jbvString;
15501548

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/06a66d87dbc7e06581af6765131ea250063fb4ac

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy