mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Clean up a bug in sql/json items commit 66ea94e8e6
				
					
				
			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
This commit is contained in:
		@@ -1540,11 +1540,9 @@ executeItemOptUnwrapTarget(JsonPathExecContext *cxt, JsonPathItem *jsp,
 | 
			
		||||
						break;
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
				res = jperOk;
 | 
			
		||||
 | 
			
		||||
				jb = &jbv;
 | 
			
		||||
				Assert(tmp != NULL);	/* We must have set tmp above */
 | 
			
		||||
				jb->val.string.val = (jb->type == jbvString) ? tmp : pstrdup(tmp);
 | 
			
		||||
				jb->val.string.val = tmp;
 | 
			
		||||
				jb->val.string.len = strlen(jb->val.string.val);
 | 
			
		||||
				jb->type = jbvString;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user