mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Fix incorrect logic in plan dependency recording
Both50e17ad28and29f45e299mistakenly tried to record a plan dependency on a function but mistakenly inverted the OidIsValid test. This meant that we'd record a dependency only when the function's Oid was InvalidOid. Clearly this was meant to *not* record the dependency in that case.50e17ad28made this mistake first, then in v1529f45e299copied the same mistake. Reported-by: Tom Lane Backpatch-through: 14, where50e17ad28first made this mistake Discussion: https://postgr.es/m/2277537.1694301772@sss.pgh.pa.us
This commit is contained in:
		@@ -1775,7 +1775,7 @@ fix_expr_common(PlannerInfo *root, Node *node)
 | 
				
			|||||||
		set_sa_opfuncid(saop);
 | 
							set_sa_opfuncid(saop);
 | 
				
			||||||
		record_plan_function_dependency(root, saop->opfuncid);
 | 
							record_plan_function_dependency(root, saop->opfuncid);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (!OidIsValid(saop->hashfuncid))
 | 
							if (OidIsValid(saop->hashfuncid))
 | 
				
			||||||
			record_plan_function_dependency(root, saop->hashfuncid);
 | 
								record_plan_function_dependency(root, saop->hashfuncid);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	else if (IsA(node, Const))
 | 
						else if (IsA(node, Const))
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user